• Post Reply Bookmark Topic Watch Topic
  • New Topic

jtextfiled and jtable

 
shellie lin
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all ,
I am using a cardlayout to create a checkbook.
So, I have a JTextField that says account name
and i need whatever the user types in the account name
to show up on my Jtable.
So, How do you add words to the JTextField and get it stored onto a Jtable
I couldn't find any good examples this
Any help would be helpful.
Thank you !

 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
shellie lin wrote:
So, How do you add words to the JTextField and get it stored onto a Jtable


Welcome to the Ranch!
Swing is MVC based, so all visual components rely on the underlying model for the data to display.
In your case, you will need to update the model associated with the table.
More about manipulating and using JTable here https://docs.oracle.com/javase/tutorial/uiswing/components/table.html
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!