Thread View: comp.lang.java.gui
1 messages
1 total messages
Started by SOL-ion
Mon, 29 Apr 2002 22:52
JPanels
Author: SOL-ion
Date: Mon, 29 Apr 2002 22:52
Date: Mon, 29 Apr 2002 22:52
20 lines
1866 bytes
1866 bytes
Hi all,
I am trying to make a "drawing area" within a JPanel. I was thinking of
putting another JPanel within a JPanel. I have tried this, but it does not
seem to be working. Some of the code is below. Sorry if this is completly
wrong, I am new to java.
amountofFlags = 0;
// Set the default name for this flag
flagName [0] = "Flag 1";
flags [amountofFlags] = new JPanel ();
// Create the actual drawing area
drawingArea [amountofFlags] = new JPanel ();
drawingArea [amountofFlags].setBackground ( Color.white );
drawingArea [amountofFlags].setSize ( 200, 100 );
// Add the Drawing Area to the the Flag Panel (Tabbed Pane)
flags [amountofFlags].add ( drawingArea [amountofFlags],
BorderLayout.CENTER );
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads