Re: Need help with JFrame app
- From: Thomas Weidenfeller <nobody@xxxxxxxxxxxxxxxx>
- Date: Mon, 30 Oct 2006 09:59:21 +0100
Tag wrote:
XOPanel creates a window and what i want it to
do is draw a 3x3 gris on this window and fill each of these spaces with
its coresponding XOSquare. Each XOSquare is just a JPanel
Here you go likely wrong.
With JPanel one either uses
1) JPanel + Java 2D graph drawing
or
2) JPanel + LayoutManager + Components (incl. additional JPanels)
For graphics one typically uses option 1): Completely drawing the contents of the JPanel with the Java 2D API, instead of placing additional panels on the main JPanel.
Mixing option 1) and 2) on the same JPanel is often not a good idea. You easily end up in all sorts of unpleasant hacks.
/Thomas
--
The comp.lang.java.gui FAQ:
http://gd.tuwien.ac.at/faqs/faqs-hierarchy/comp/comp.lang.java.gui/
ftp://ftp.cs.uu.nl/pub/NEWS.ANSWERS/computer-lang/java/gui/faq
.
- References:
- Need help with JFrame app
- From: Tag
- Need help with JFrame app
- Prev by Date: Trouble querying for unique records
- Next by Date: Re: JSP - mozilla and firefox problem.
- Previous by thread: Need help with JFrame app
- Next by thread: Trouble querying for unique records
- Index(es):