Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-23-2008, 01:59 AM
Member
 
Join Date: Sep 2008
Posts: 29
Rep Power: 0
whosadork is on a distinguished road
Default JOptionPane
How do i make all the different JPanel Boxes on the same box?

Code:
import javax.swing.JOptionPane;

public class AstroEmpiresCalculator 
{
	public static void main( String args[] )
	{
		int Fighters = 0;
		int Bombers = 0;
		int HeavyBombers = 0;
		
		JOptionPane.showInputDialog( "Fighters",Fighters );
		JOptionPane.showInputDialog( "Bombers",Bombers );
		JOptionPane.showInputDialog( "Heavy Bombers",HeavyBombers );
		
	}
}
Bookmark Post in Technorati
Reply With Quote
  #2 (permalink)  
Old 10-23-2008, 02:54 AM
Eku Eku is offline
Senior Member
 
Join Date: May 2008
Location: Makati, Philippines
Posts: 234
Rep Power: 2
Eku is on a distinguished road
Default
all in same box?

you can always try to create another container (with all those inputs in it) rather than using multiple Input dialog.
__________________
Mind only knows what lies near the heart, it alone sees the depth of the soul.
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 10-23-2008, 03:17 AM
hardwired's Avatar
Senior Member
 
Join Date: Jul 2007
Posts: 1,577
Rep Power: 4
hardwired is on a distinguished road
Default
Code:
        String s = "<html>Fighters: " + Fighters + "<br>" +
                   "Bombers: " + Bombers + "<br>" +
                   "Heavy Bombers: " + HeavyBombers;
        JOptionPane.showMessageDialog(null, s);
Bookmark Post in Technorati
Reply With Quote
Reply

Bookmarks

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

BB 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 Mir New To Java 5 11-29-2008 03:04 AM
JOptionPane problem MomenT New To Java 22 10-02-2008 06:56 PM
About JOptionPane.showMessageDialog jhetfield18 AWT / Swing 2 11-02-2007 11:45 PM
About JOptionPane.showMessageDialog jhetfield18 Advanced Java 0 11-02-2007 11:56 AM
problems with JOptionPane oregon AWT / Swing 2 08-05-2007 06:58 PM


All times are GMT +2. The time now is 03:09 PM.



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