用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