JSplitPane JXImagePanel refresh problem - help !!!

P

patrick boulay

M

Michael Rauscher

patrick said:
when I click on a leaf element of the JTRee on I want to change the
image displayed on the right ( JXImagePanel )

it does not work unless I use(modify) the splitbar loc by hand

First, you must manipulate Swing components only from within the EDT. In
consequence, you should move the JXImagePanel#setImage call to
SwingWorker#done.

Second, you should ensure that image creation has completed before
JXImagePanel#setImage is called. E. g. use MediaTracker.

Bye
Michael
 
P

patrick boulay

Michael said:
First, you must manipulate Swing components only from within the EDT. In
consequence, you should move the JXImagePanel#setImage call to
SwingWorker#done.

Second, you should ensure that image creation has completed before
JXImagePanel#setImage is called. E. g. use MediaTracker.

Bye
Michael

thank you but same problem again after code fixed to what u said
 

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

Members online

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top