Win a copy of Modern JavaScript for the Impatient this week in the Server-Side JavaScript and NodeJS forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

popup

 
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.
 
Bartender
Posts: 11445
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • 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
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • 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 ]
 
So I left, I came home, and I ate some pie. And then I read this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic