用panel来做,对其边框设置。
JPanel buttonPanel = new JPanel(new FlowLayout()); buttonPanel.setBorder(BorderFactory.createTitledBorder( "Edit ")); //设置边框 buttonPanel.add(new JButton( "button1 "));
Copyright @ baby-fly Powered by: .Text and ASP.NET Theme by: .NET Monster