 |
AppletTalk.com Java discussions newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
TADsince1995 Guest
|
Posted: Wed Aug 16, 2006 2:51 pm Post subject: JComboBox freezes gui |
|
|
Hello all,
I'm writing an application that uses swing, but I've a really weird
problem. In this app I use JLabels, JButtons, menus, textbox and
JComboBox, everything works fine but not JComboBox. When user clicks on
JComboBox the entire gui freezes and don't response anymore, I tried to
insert a messagebox on mousepressed event and I noticed that the
messagebox doesn't appear, I think that even the event doesn't start. I
tried to search with google but I didn't find nothing specific about it.
I'm using Java 1.4.2 on linux, but this problem appears on Windows too.
Can someone help me?
Thank you in advance, and sorry for my very poor english!
TAD |
|
| Back to top |
|
 |
Bart Cremers Guest
|
Posted: Wed Aug 16, 2006 4:30 pm Post subject: Re: JComboBox freezes gui |
|
|
It would be easier to help out if you could post some simple example
code displaying the problem you have. I've used JComboBoxes many times
before and never had one of them freeze the gui.
Bart |
|
| Back to top |
|
 |
Ian Wilson Guest
|
Posted: Wed Aug 16, 2006 7:23 pm Post subject: Re: JComboBox freezes gui |
|
|
TADsince1995 wrote:
| Quote: | Hello all,
I'm writing an application that uses swing, but I've a really weird
problem. In this app I use JLabels, JButtons, menus, textbox and
JComboBox,
|
Some of those don't start with a J, you're not mixing AWT and Swing
components are you?
| Quote: | everything works fine but not JComboBox. When user clicks on
JComboBox the entire gui freezes and don't response anymore, I tried to
insert a messagebox on mousepressed event and I noticed that the
messagebox doesn't appear, I think that even the event doesn't start. I
tried to search with google but I didn't find nothing specific about it.
|
I use JComboBoxes without freezing the GUI. I guess there's something in
your code. http://mindprod.com/jgloss/sscce.html
| Quote: |
I'm using Java 1.4.2 on linux, but this problem appears on Windows too.
Can someone help me?
|
When my GUI appears to freeze I usually find there's some console
messages telling me why (easy to see using Eclipse). Is this not the
case for you?
| Quote: | Thank you in advance, and sorry for my very poor english!
|
Your English seems pretty good to me. When worried about language
problems, I'd speak Java instead (see SSCCE above). |
|
| Back to top |
|
 |
johnmmcparland Guest
|
Posted: Thu Aug 17, 2006 8:48 pm Post subject: Re: JComboBox freezes gui |
|
|
TADsince1995 wrote:
| Quote: | Hello all,
I'm writing an application that uses swing, but I've a really weird
problem. In this app I use JLabels, JButtons, menus, textbox and
JComboBox, everything works fine but not JComboBox. When user clicks on
JComboBox the entire gui freezes and don't response anymore, I tried to
insert a messagebox on mousepressed event and I noticed that the
messagebox doesn't appear, I think that even the event doesn't start. I
tried to search with google but I didn't find nothing specific about it.
I'm using Java 1.4.2 on linux, but this problem appears on Windows too.
Can someone help me?
Thank you in advance, and sorry for my very poor english!
TAD
|
Obviously a self contained example would add weight to my guess but
often the interface can freeze if you try to do too much in your event
handlers. If you are doing a time consuming action (sorting a very
large list etc) then you should startup a new thread to do this. In
the event handler poll for this thread to end then carry on. In the
time between the UI will be able to repaint itself. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|