Re: Need help with JFrame app



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
.