🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.java.gui
Article #28

JPanels

#28
From: SOL-ion
Date: Mon, 29 Apr 2002 22:52
20 lines
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 );
Technical Details
Message-ID: <aakir4$2di$1@helle.btinternet.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!kibo.news.demon.net!demon!btnet-peer0!btnet-feed5!btnet!news.btopenworld.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,d40ea0ad1dfe5e0a,start
X-Google-Attributes: gid111d45,public
X-Google-Thread: 10fd6d,d40ea0ad1dfe5e0a,start
X-Google-Attributes: gid10fd6d,public
X-Google-ArrivalTime: 2002-04-29 15:53:32 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!kibo.news.demon.net!demon!btnet-peer0!btnet-feed5!btnet!news.btopenworld.com!not-for-mail
From: "SOL-ion" <???@brad.ac.uk>
Newsgroups: comp.lang.java.gui,borland.public.jbuilder.java.swing
Subject: JPanels
Date: Mon, 29 Apr 2002 22:52:21 +0000 (UTC)
Organization: BT Openworld
Lines: 22
Message-ID: <aakir4$2di$1@helle.btinternet.com>
NNTP-Posting-Host: host217-39-42-83.in-addr.btopenworld.com
X-Trace: helle.btinternet.com 1020120741 2482 217.39.42.83 (29 Apr 2002 22:52:21 GMT)
X-Complaints-To: news-complaints@lists.btinternet.com
NNTP-Posting-Date: Mon, 29 Apr 2002 22:52:21 +0000 (UTC)
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MSMail-Priority: Normal
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000