-
Simple Help plz
hi people
im working on ATM class and i have a variable of type double named "amount"
i can display it like this "System.out.print( amount );"
but i want to display it using JOptionPane dialoge boxes.
What is the line to use?
-
I suggest you check out the Sun tutorials on Swing.
-
Code:
java.text.DecimalFormat df=new java.text.DecimalFormat("0.00");
JOptionPane.showMessageDialog(new Frame(),
"Amount: "+df.format(amount),
"Her it is",
JOptionPane.INFORMATION_MESSAGE);
eschew obfuscation
-
try this,
JOptionPane.showMessageDialog ( "Amount is " +amount);
-
Thank you
-
Does this compile on 1.5 ?
 Originally Posted by shivaprasad
try this,
JOptionPane.showMessageDialog ( "Amount is " +amount);
It doesn't on 1.4...
eschew obfuscation
-
yeh it will work on 1.4
i am using 1.4.2_07 version. it is working fine.
bye
shiva prasad.
Similar Threads
-
Replies: 4
Last Post: 08-10-2005, 10:30 AM
-
By nsbscool in forum Java
Replies: 1
Last Post: 05-02-2005, 08:01 AM
-
By Ranchoz71 in forum ASP.NET
Replies: 3
Last Post: 04-06-2005, 12:40 PM
-
By slimasian in forum VB Classic
Replies: 1
Last Post: 03-02-2005, 01:38 PM
-
Replies: 0
Last Post: 03-21-2001, 04:01 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|