• Post Reply Bookmark Topic Watch Topic
  • New Topic

popup  RSS feed

 
dav mrazek
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, i would like to do a popup window to gather information and then process it. My problem is what component would be the most suitable to implement this popup window. I dont want a JDialog cause i would like to do my own title bar and customize the popup dialog for transparency and other customized things. I want this to be modal if possible and also the popup will contain a button that will show a JFileChooserDialog if possible.
What would be the most suitable component to use ?
Thank you.
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I had done this some time back, just for fun. After playing around with lots of classes, I finally came to the conclusion that there is no way you can make any window/dialog transperant.(I would love to be proved wrong. If you have any workaround, please do share it).

What I had finally done, was set a glass pane to the main window. I had written a generic panel which had a title area at the top, with place for icon, title and close button. (I was wanting to achieve a sort of Google talk chat window LAF). I had made this transperant. Whenever I wanted to "pop" a modal window, I would add this transperant panel to the glass pane. The glass pane was then configured to intercept all inputs.

If you come with a better solution, please let me know.
 
dav mrazek
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, it is not possible to make a the background of JWindow transparent ?
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by dav mrazek:
Hello, it is not possible to make a the background of JWindow transparent ?


You wish!
Unfortunately, JWindow does not extend JComponent which has the setOpaque method.
 
dav mrazek
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Alright then if i cant do transparency at least i can customize it and give some color or gradient and have a personnalized title bar. Or would it be possible to build a Popup using JComponent ? If yes how to make it modal ?
Or what component can i use ?
[ November 15, 2007: Message edited by: dav mrazek ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!