JTable


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: JTable

  1. #1
    tillu Guest

    JTable


    hello Everyone,
    I'm having a problem using JTable. I want the rows to be created
    dynamically. i.e. when I press the enter key after entering data in the last
    column, next row should appear automatically, so that user can enter data
    in the 2nd row..and so on..... is it possible to get like that??
    Any help would be appreciated.

    Thanks in advance,
    tillu

  2. #2
    Mark Guest

    Re: JTable


    I haven't done it, but you should be able to. Add a listener on the last
    column and look for the enter key. If you are on the last row and column
    and an the enter key is passed to the listener then add a row to your TableModel.

    Your time might be better served finding/using a custom object that already
    exibits this behavour.

    Mark

    tillu" <java.@127.0.0.1> wrote:
    >
    >hello Everyone,
    > I'm having a problem using JTable. I want the rows to be created
    >dynamically. i.e. when I press the enter key after entering data in the

    last
    >column, next row should appear automatically, so that user can enter data
    >in the 2nd row..and so on..... is it possible to get like that??
    >Any help would be appreciated.
    >
    >Thanks in advance,
    >tillu



  3. #3
    tillu Guest

    Re: JTable


    hello Mark,
    If it's possible, can you please write a peace of code for that operation...I'm
    not able to create rows dynamically.
    Thanks for your help,
    tillu.
    "Mark" <java.@127.0.0.1> wrote:
    >
    >I haven't done it, but you should be able to. Add a listener on the last
    >column and look for the enter key. If you are on the last row and column
    >and an the enter key is passed to the listener then add a row to your TableModel.
    >
    >Your time might be better served finding/using a custom object that already
    >exibits this behavour.
    >
    >Mark
    >
    >tillu" <java.@127.0.0.1> wrote:
    >>
    >>hello Everyone,
    >> I'm having a problem using JTable. I want the rows to be created
    >>dynamically. i.e. when I press the enter key after entering data in the

    >last
    >>column, next row should appear automatically, so that user can enter data
    >>in the 2nd row..and so on..... is it possible to get like that??
    >>Any help would be appreciated.
    >>
    >>Thanks in advance,
    >>tillu

    >



  4. #4
    Mark Guest

    Re: JTable


    I will if I have the time. It doesn't look like I will very soon.

    Mark



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center