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 JTextAreasin its ownJScrollPanes, -
JScrollPanesin aGridLayoutJPanel - using
JPanelin aborder layout(1, 2) (1 row, two columns)BorderLayout.CENTER- using
JPaneland placeJPanelatBorderLayout below. PAGE_ENDStatus
- using
Something like this:
No comments:
Post a Comment