This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I am having problems with GUI layouts. When certain button is pressed it generates a 'ghost' panel (beside other errors like controlling layout properly). See below code (sorry about formatting):- // <applet code="TokenProgramTest.class" width=550 height=350> // </applet> // c:\jdk1.2.2\bin\appletviewer TokenProgramTest.java
[ February 19, 2002: Message edited by: Cindy Glass ]
Hi Jim, Not exactly sure what you are doing, but BorderLayout works like this: West and East components get to be their preferred width. Your ImagePanels don't have any perferred size so they appear very slim. North and South components get to be their preferred height. Your topPanel doesn't get enough width to spread out. To see what is happening you need to place the following line, as the first line, in each of your paint methods: super.paint( screen ); Then your background colors will be drawn and you can see what is happening better. Regards, Manfred. [ February 20, 2002: Message edited by: Manfred Leonhardt ]