• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Gui components disappearing

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello, I made a gui, this gui containts a JTree, a JList, encapsulated in a JScrollPane and a couple of JButtons.

I thought it worked, but today I double clicked accidentally on a JTree entry and all things disappearded.
If i hover over the components, they become visible again, but it's not the intention. Is there any solution to let the other components be visible when i double click?

Here's my code:


 
Bartender
Posts: 3323
86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That's too much uncommented code for me to look through right now so the following is a total guess but when GUI components disappear as you have described it can be down to structurally changing the GUI in some way (eg add/removing components) and not revalidating it.
 
Sheriff
Posts: 28395
100
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I haven't looked at the code much either, but I can say that I have an application which uses JTrees extensively, and it used to be that my tree model didn't report changes correctly and as a result I used to get blank spaces between the rows and other undesirable mis-features.
 
Stef Van Gils
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And what was the solution to it?

I add the components when I create the JFrame, I only change the entries of a JList and the nodes of the JTree
 
reply
    Bookmark Topic Watch Topic
  • New Topic