How do I put two Jpanels/Jbuttons in the borderlayout north section?
问题 How do I display two JPanels in the 'North' in borderlayout? Here's and example code that outputs a GUI with three distinct rows, Top, Middle, Bottom. There's one button covering the first row, 3 buttons covering the second row, and one covering the bottom row. package borderLayoutDemo; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JPanel; import java.awt.BorderLayout; public class BorderLayoutDemo { public static void main(String[] args) { JFrame