Tuesday, 15 July 2014

java - Utilizing BorderLayout on JFrame. ( Using Container) -


New in GUI, I am trying to create a simple GeFram where two JTextAreas are located next to each other and one JPNL Floor

  Expands the public square demo Jeffrera {JPNL panel; JTextArea JTextArea1; JTextArea JTextArea2; Decision Decision Panel; Public demo () {super ("black jack server"); JFrame f = new JFrame (); F.setSize (400, 400); ; F.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE); F.setVisible (true); DecisionPanel DecisionPanel = New DecisionPanel (); F.getContentPane () Add (decisionPanel); JTextArea1 = new JTextArea (); Joint (JTextArea1); JTextArea2 = new JTextArea (); Joint (JTextArea2); }}  

Do I want to use border layout to get results? If so, how can I approach?

You nest the JPNLs and ...

  • Keep JTextAreas in its own JScrollPanes ,
  • JScrollPanes in a GridLayout JPanel
  • using JPanel in a border layout (1, 2) (1 row, two columns) BorderLayout.CENTER
  • using JPanel and place JPanel at BorderLayout below. PAGE_END Status

Something like this:


No comments:

Post a Comment