images in popup windows


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: images in popup windows

Hybrid View

  1. #1
    Join Date
    May 2005
    Posts
    15

    images in popup windows

    ok, how exactly would i make a popup window (JOptionPane) that contains a custom image, and only a ok box?
    if i make the image the icon, it is shrunken way down, and placed in the side of the box, i want the image to be compleatly centered in the window, and below it only have the ok box, which would get rid of the window

  2. #2
    Join Date
    Oct 2004
    Posts
    311
    make your own pop-up box and just let it extend JDialog. That way, you can make it modal if needed, but you have maximum control over how it will end up.

  3. #3
    Join Date
    May 2005
    Posts
    15
    ok well actoually i used JOptionPane.showMessageDialog(null,"","",0,new ImageIcon(image));
    this correctly creates the window with the image in it, with an ok button
    but the problem is
    that it calls paint after it executes
    setIgnoreRepaint(false) does not stop this from happening, could anybody explain how 2 stop the JOptionPane from calling repaint after it is closed?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center