labels on panels disappear

R

Robert

Hi everyone,

I am pretty new to Java and I am writing a simple chess applet. My
chessboard is a gridlayout with panels. On those panels there are
labels which symbolize the chess pieces. When I click on a piece I can
then click on a second field of the chessboard and the piece (the
label) moves to it. For some reason it does not show up there though.
When I run the applet using Eclipse I can make the piece show up when
I resize the applet with my mouse. When I load the applet with a
browser this does not work either. It is strange to me that everyting
works fine when I move a piece to a field where there had been another
piece before. Not so, when I move the piece to a field, where there
has not been another piece before. I have tried several repaint
methods on it but it still has not worked. Please help me out on this.
You can try my applet at

http://mycgiserver.com/~schachserver/Schach/schachclient.html

Note that the labels are in German but this does not matter. Hit the
"Ziehen" button and you can then move the pieces. Click on a piece and
it will be highlighted. Then click on second field (no matter where as
long as there is no piece on it) and it will move there.

You can see what I mean if you move the piece in the upper left corner
to some field with no piece on it. It will not show up there. If you
then move the piece next to it (second colum, upper row) to the upper
left corner. This will show up there for some reason.

Please help.
 
C

Christophe Vanfleteren

Robert wrote:

Stop multiposting already.
This will not be getting you any more help, au contraire even.
 
A

Andrew Thompson

Christophe Vanfleteren said:
Robert wrote:

Stop multiposting already.
This will not be getting you any more help, au contraire even.

I agree with Christophe.

I already replied to you on c.l.j.g., and I
have no intention of responding to the
discussion here as well.
 
R

Robert

Sorry guys,

I probably still have no idea of the complexity of Usenet. I could not
believe that people could actually come across more then one of each
copy.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top