Search
Search titles only
By:
Search titles only
By:
Log in
Register
Search
Search titles only
By:
Search titles only
By:
Menu
Install the app
Install
Forums
New posts
All threads
Latest threads
New posts
Trending threads
Trending
Search forums
What's new
New posts
New ads
New profile posts
Latest activity
Free Ads
Latest reviews
Search ads
Members
Current visitors
New profile posts
Search profile posts
Contact us
Latest ads
එක පැකේජ් එකයි මාසෙටම Unlimited Internet. තාමත් DATA CARD දාන්න සල්ලි වියදම් කරනවද? අඩුම මිලට අපෙන්.
sayuru bandara
Updated:
Tuesday at 12:30 PM
Ad icon
ඉන්ටර්නෙට් එකෙන් හරියටම සල්ලි හොයන්න සහ Success වෙන්න කැමතිද? 🚀 (E-Money & Success Stories)
siri sumana
Updated:
Saturday at 11:44 PM
Gemini AI PRO 18 months Offer
Hawaka
Updated:
May 27, 2026
Ad icon
koko account
DasunEranga
Updated:
May 27, 2026
Ad icon
koko account
DasunEranga
Updated:
May 27, 2026
Electronics
Vehicles
Property
Search
Reply to thread
Forums
General
ElaKiri Talk!
Java HELP!
Get the App
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Message
<blockquote data-quote="annunaki" data-source="post: 20371484" data-attributes="member: 418740"><p><span style="font-size: 15px">මේකෙ Item No එක 9 input කරනකම් UI එක refresh වේවි inputs ගන්න ඔනි coding ටික හරි UI එකෙන් 9 input කරනකම් JFrame එක refresh වෙන්න හදනන ටික අවුල්</span></p><p><span style="font-size: 15px"></span></p><p><span style="font-size: 15px">Text Fields refresh වෙන්න හැදුවත් shape 9 input කරනකම්</span></p><p><span style="font-size: 15px"></span></p><p><span style="font-size: 15px"><img src="http://i64.tinypic.com/2zqe87n.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /></span></p><p><span style="font-size: 15px"></span></p><p><span style="font-size: 15px">[CODE]public int item(int itemNo,int qty){</span></p><p><span style="font-size: 15px"> </span></p><p><span style="font-size: 15px"> switch (itemNo) {</span></p><p><span style="font-size: 15px"> case 1:</span></p><p><span style="font-size: 15px"> return 2500*qty;</span></p><p><span style="font-size: 15px"> case 2:</span></p><p><span style="font-size: 15px"> return 1500*qty;</span></p><p><span style="font-size: 15px"> case 3:</span></p><p><span style="font-size: 15px"> return 200*qty;</span></p><p><span style="font-size: 15px"> case 4:</span></p><p><span style="font-size: 15px"> return 750*qty;</span></p><p><span style="font-size: 15px"> default:</span></p><p><span style="font-size: 15px"> return 0;</span></p><p><span style="font-size: 15px"> }</span></p><p><span style="font-size: 15px"> }</span></p><p><span style="font-size: 15px"> </span></p><p><span style="font-size: 15px"> public int order(int inputNo,int inputQty){</span></p><p><span style="font-size: 15px"> </span></p><p><span style="font-size: 15px"> int total = 0;</span></p><p><span style="font-size: 15px"> total = total + item(inputNo,inputQty);</span></p><p><span style="font-size: 15px"> return total;</span></p><p><span style="font-size: 15px"> }[/CODE]</span></p><p><span style="font-size: 15px"></span></p><p><span style="font-size: 15px">[CODE]private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { </span></p><p><span style="font-size: 15px"> // TODO add your handling code here:</span></p><p><span style="font-size: 15px"> </span></p><p><span style="font-size: 15px"> int inputNo = Integer.parseInt(input_no.getText());</span></p><p><span style="font-size: 15px"> int inputQty = Integer.parseInt(input_qty.getText());</span></p><p><span style="font-size: 15px"> int subTotal =0;</span></p><p><span style="font-size: 15px"> </span></p><p><span style="font-size: 15px"> while( inputNo !=9 || inputNo > 9){</span></p><p><span style="font-size: 15px"> subTotal = order(inputNo,inputQty);</span></p><p><span style="font-size: 15px"> }</span></p><p><span style="font-size: 15px"> </span></p><p><span style="font-size: 15px"> System.out.println(subTotal);</span></p><p><span style="font-size: 15px"> } [/CODE]</span></p><p><span style="font-size: 15px"></span></p><p><span style="font-size: 15px"></span></p></blockquote><p></p>
[QUOTE="annunaki, post: 20371484, member: 418740"] [SIZE=4]මේකෙ Item No එක 9 input කරනකම් UI එක refresh වේවි inputs ගන්න ඔනි coding ටික හරි UI එකෙන් 9 input කරනකම් JFrame එක refresh වෙන්න හදනන ටික අවුල් Text Fields refresh වෙන්න හැදුවත් shape 9 input කරනකම් [IMG]http://i64.tinypic.com/2zqe87n.png[/IMG] [CODE]public int item(int itemNo,int qty){ switch (itemNo) { case 1: return 2500*qty; case 2: return 1500*qty; case 3: return 200*qty; case 4: return 750*qty; default: return 0; } } public int order(int inputNo,int inputQty){ int total = 0; total = total + item(inputNo,inputQty); return total; }[/CODE] [CODE]private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: int inputNo = Integer.parseInt(input_no.getText()); int inputQty = Integer.parseInt(input_qty.getText()); int subTotal =0; while( inputNo !=9 || inputNo > 9){ subTotal = order(inputNo,inputQty); } System.out.println(subTotal); } [/CODE] [/SIZE] [/QUOTE]
Insert quotes…
Verification
Hathara warak wissa keeyada? (Hathara wadi karanna 20)
Post reply
Top
Bottom