How can i transfer the data to other txtfield when click submit

  • (3 Pages)
  • +
  • 1
  • 2
  • 3

31 Replies - 2445 Views - Last Post: 25 September 2012 - 06:13 PM Rate Topic: -----

#16 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8332
  • View blog
  • Posts: 31,857
  • Joined: 06-March 08

Re: How can i transfer the data to other txtfield when click submit

Posted 23 September 2012 - 07:37 PM

Good Lord !!! Which JDK do you use ? 1.4 ? We are at 1.7 but I recommend 1.6

replace

add(bigPanel);
by
getContentPane().add(bigPanel);
Was This Post Helpful? 0
  • +
  • -

#17 keziahcook  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 22
  • Joined: 22-September 12

Re: How can i transfer the data to other txtfield when click submit

Posted 23 September 2012 - 07:53 PM

Waaaaaa...
Im an old version T_T...
Sir can you give a new version of java.
Was This Post Helpful? 0
  • +
  • -

#18 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8332
  • View blog
  • Posts: 31,857
  • Joined: 06-March 08

Re: How can i transfer the data to other txtfield when click submit

Posted 23 September 2012 - 07:55 PM

Google java jdk download

but
getContentPane().add(bigPanel);
should work
Was This Post Helpful? 0
  • +
  • -

#19 keziahcook  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 22
  • Joined: 22-September 12

Re: How can i transfer the data to other txtfield when click submit

Posted 23 September 2012 - 08:00 PM

It WORK SIR.....THANK YOUUUUUUUUUUUUUUUUUUUUUUUUUU...
sir.How can I change the textfields in column employees into Int cause
I will use the min max button there?

Thank you....SO MUCH.... SIR
Was This Post Helpful? 0
  • +
  • -

#20 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8332
  • View blog
  • Posts: 31,857
  • Joined: 06-March 08

Re: How can i transfer the data to other txtfield when click submit

Posted 23 September 2012 - 08:07 PM

JTextField and JLabel are to represent data (input or output) have nothing to do with actual data value. That is a whole other concept.
Was This Post Helpful? 0
  • +
  • -

#21 keziahcook  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 22
  • Joined: 22-September 12

Re: How can i transfer the data to other txtfield when click submit

Posted 23 September 2012 - 08:13 PM

ahh. There is no need to convert it into integer right?

thankkkk..you again sir.
Was This Post Helpful? 0
  • +
  • -

#22 keziahcook  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 22
  • Joined: 22-September 12

Re: How can i transfer the data to other txtfield when click submit

Posted 24 September 2012 - 05:47 AM

Sir can you do the Max Button that if I click it, the Employee ID,Name and the max sales
will be shown in a messageBOX?
Was This Post Helpful? 0
  • +
  • -

#23 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8332
  • View blog
  • Posts: 31,857
  • Joined: 06-March 08

Re: How can i transfer the data to other txtfield when click submit

Posted 24 September 2012 - 05:52 AM

You will have to do a for() loop for each of your row
Use Double.parseDouble() to translate from string to double what is contain in the label of the last column text
Remember the highest one (and its index) to display the name in your Box
Was This Post Helpful? 1
  • +
  • -

#24 keziahcook  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 22
  • Joined: 22-September 12

Re: How can i transfer the data to other txtfield when click submit

Posted 24 September 2012 - 06:36 AM

Sorry for bothering you sir can you give me at least example of it
cause I really don't know what to do..
and my teacher don't teach well about java and I'm only self studying.
Sorry sir.
Was This Post Helpful? 0
  • +
  • -

#25 keziahcook  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 22
  • Joined: 22-September 12

Re: How can i transfer the data to other txtfield when click submit

Posted 25 September 2012 - 06:53 AM

is this correct?
int x = Double.parseDouble(labels);
Was This Post Helpful? 0
  • +
  • -

#26 macosxnerd101  Icon User is online

  • Self-Trained Economist
  • member icon




Reputation: 10563
  • View blog
  • Posts: 39,087
  • Joined: 27-December 08

Re: How can i transfer the data to other txtfield when click submit

Posted 25 September 2012 - 07:35 AM

What type of variable is labels? The Double.parseDouble() method accepts a String, not a Component or an array.

Also, try running the code yourself. You'll figure out if it's correct much faster.
Was This Post Helpful? 0
  • +
  • -

#27 keziahcook  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 22
  • Joined: 22-September 12

Re: How can i transfer the data to other txtfield when click submit

Posted 25 September 2012 - 08:29 AM

Im not moving forward
:surrender:
Was This Post Helpful? 0
  • +
  • -

#28 macosxnerd101  Icon User is online

  • Self-Trained Economist
  • member icon




Reputation: 10563
  • View blog
  • Posts: 39,087
  • Joined: 27-December 08

Re: How can i transfer the data to other txtfield when click submit

Posted 25 September 2012 - 09:07 AM

I don't mean to be rude, but stop being helpless. Make an effort. Write code. If it fails, look at the errors. If there are logical bugs, make an effort at debugging. We're here to help you, but we aren't simply going to hold your hand.
Was This Post Helpful? 0
  • +
  • -

#29 keziahcook  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 22
  • Joined: 22-September 12

Re: How can i transfer the data to other txtfield when click submit

Posted 25 September 2012 - 10:18 AM

How can i change the labels[row][2] into double?
I've try it many times but I always got it wrong.
Sorry for out of knowledge of java program
:stupid: me...!!!

Attached Image
Was This Post Helpful? 0
  • +
  • -

#30 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8332
  • View blog
  • Posts: 31,857
  • Joined: 06-March 08

Re: How can i transfer the data to other txtfield when click submit

Posted 25 September 2012 - 11:08 AM

for(int row = 0; row < 5; ++row)
double x = Double.parseDouble( labels[row][2]);
Was This Post Helpful? 1
  • +
  • -

  • (3 Pages)
  • +
  • 1
  • 2
  • 3