Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-17-2007, 06:33 PM
Member
 
Join Date: Jul 2007
Posts: 26
romina is on a distinguished road
Problem with JOptionPane.showInputDialog()
When I use JOptionPane.showInputDialog() the input dialog pops up behind any other windows on the screen at the time.
Anyone know how to fix that?

Code:
String list[] = {"100","400","900","1600"}; String value = null; while(value == null) { value = (String)JOptionPane.showInputDialog(null,"How many cells do you want?", "John Conway's Game Of Life",JOptionPane.INFORMATION_MESSAGE,null,list,list[1]); if (value == null) JOptionPane.showMessageDialog(null,"You must choose a number.", "ERROR",JOptionPane.ERROR_MESSAGE); }
This is the section of code that the input dialog is in. Do you think that it could possibly have something to do with the IDE?
Thanks
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 08-07-2007, 07:33 AM
Member
 
Join Date: Jul 2007
Posts: 40
barney is on a distinguished road
I need to create an InputDialog using JOptionPane with two input fields an a large information message. How can I do this? Or may be it's better to create a JDialog?
Sounds like you will be using a JFrame or JPanel. Have you worked with either of these yet? The input won't be hard once you get the actual window working.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
JOptionPane (customizing) Java Tip Java Tips 0 03-14-2008 01:39 PM
JOptionPane - input dialog Java Tip Java Tips 0 12-17-2007 11:09 AM
About JOptionPane.showMessageDialog jhetfield18 AWT / Swing 2 11-03-2007 12:45 AM
About JOptionPane.showMessageDialog jhetfield18 Advanced Java 0 11-02-2007 12:56 PM
problems with JOptionPane oregon AWT / Swing 2 08-05-2007 07:58 PM


All times are GMT +3. The time now is 04:34 PM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org