Pls.. Someone help me on how to display in JLabel the product with two decimal places after I click a button.. pls. help I am new in making a swing program
akosivivas -3 Newbie Poster
Recommended Answers
Jump to PostNobody's going to give you the code because it's far better if you learn how to do it yourself, so...
You can use the format method in the String class to format your data any way you want before putting it in the JLabel.
All 3 Replies
bibiki 18 Posting Whiz
JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster
radhakrishna.p 29 Posting Whiz in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.