• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Jtable cut and paste

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Friends
My java program consists of 2 Jtables ans 1 button.Suppose if i selects a row and click on the Jbutton the selected row should be deleted from the first table and pasted on the second table
ThanQ
 
Ranch Hand
Posts: 158
Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If i were you, I would do the following:

Conditions:
===========
Same column in both table
Must have row in another table.

First i will make a vector.
What vector will do is that it will fill all column value into vector through special character between them like
Vector 1 = "1,abc,500"
Vector 2 = "2,xyz,4500"

Here i have used comma between three column data from jTable.

Then through StringTokenizer i would seperate them and place them into 2nd JTable.

Hope this concept would help you out.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic