CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: Azoth

Page 1 of 3 1 2 3

Search: Search took 0.02 seconds.

  1. Replies
    2
    Views
    7,292

    Re: How to reinsert deleted columns in a Jtable

    Thanks. I solved this problem
  2. Replies
    0
    Views
    1,544

    Jtable listener help

    I found a bug in my jtable after it is resized. If you
    click with a mouse in a cell, the table returns to the default . So I want a listener of sorts that catches mouse/ keys & keeps the resized...
  3. Replies
    2
    Views
    7,292

    How to reinsert deleted columns in a Jtable

    The code I am using states index out of bounds
    The code I am using is

    void Insert(int index)
    {table.moveColumn(table.getColumnCount()-1,index);}


    Help
  4. Replies
    21
    Views
    25,589

    Re: jtable column blues

    What I want is
    // | Col 0 | Col 2 | Col 3 |
    // | 1st | 3rd | 4th |

    and this :
    // | Col 0 | Col 6 |
    // | 1st | 7th |

    I have problems removing the last column or first...
  5. Replies
    21
    Views
    25,589

    Re: jtable column blues

    No for loop needed?
  6. Replies
    21
    Views
    25,589

    Re: jtable column blues

    I have a table with 7 columns
    Since indexes start at 0,cols go 0-6 .
    I want col 2 and cols 4-6 deleted
  7. Replies
    21
    Views
    25,589

    Re: jtable column blues

    I have a table with 7 columns
    Since indexes start at 0;columns go 0-6
    So i want col 1 and 4- 6 removed
  8. Replies
    21
    Views
    25,589

    Re: jtable column blues

    here is the code

    for(int col=0;col<=2;col++)
    StatsTable.removeColumn(StatsTable.getColumnModel().getColumn(1));
    It does not remove the last 3 columns

    Columns after removal I want...
  9. Replies
    21
    Views
    25,589

    Re: jtable column blues

    The code has been posted previously.
  10. Replies
    21
    Views
    25,589

    Re: jtable column blues

    The code has been posted previously.
  11. Replies
    21
    Views
    25,589

    Re: jtable column blues

    Ok I got rid of the 2nd column,but can’t get rid of the last one .
    Any ideas?
  12. Replies
    21
    Views
    25,589

    Re: jtable column blues

    [QUOTE=jcaccia;2218091]Is it the original column #2 that is not deleted or a column that shows now in the second position after deleting them?
    The correct code should be:

    for (int col = 1; col <...
  13. Replies
    21
    Views
    25,589

    Re: jtable column blues

    [QUOTE=jcaccia;2218091]Is it the original column #2 that is not deleted or a column that shows now in the second position after deleting them?
    The correct code should be:

    for (int col = 1; col <...
  14. Replies
    21
    Views
    25,589

    Re: jtable column blues

    Ok that gets rid of many columns except the 2nd one.
    I tried variants like


    for (int col=3; col <= 6; col++)
    StatsTable.removeColumn(StatsTable.getColumnModel().getColumn(3));

    ...
  15. Replies
    21
    Views
    25,589

    Re: jtable column blues

    Uh huh..I didn't think of that about the columns
    Could you give the code for the loop that describes
    this?
  16. Replies
    21
    Views
    25,589

    jtable column blues

    I have a table with 7 columns. I am trying to delete columns 2-6. Here is the code:

    for(int col=1;col<6;col++)
    StatsTable.removeColumn(StatsTable.getColumnModel().getColumn(col));

    It...
  17. Replies
    11
    Views
    3,618

    Re: Jtable retruning nulls

    I get
    2
    3
    4
    for

    (StatsTable.getValueAt(i,0)
  18. Replies
    11
    Views
    3,618

    Re: Jtable retruning nulls

    javax.swing.JTable[,0,0,606x160,alignmentX=0.0,alignmentY=0.0,border=javax.swing.border.MatteBorder@129d20b,flags=251658560,maximumSize=,minimumSize=,preferredSize=,autoCreateColumnsFromModel=true,aut...
  19. Replies
    11
    Views
    3,618

    Re: Jtable retruning nulls

    The values
    1
    2
    3
    came from the the code
    if (Integer.parseInt(StatsTable.getValueAt(i,0).toString()) != 0)
    When printing out i I get
    0
    1
    2
  20. Replies
    11
    Views
    3,618

    Re: Jtable retruning nulls

    The statement (9219) returns
    1
    2
    3
  21. Replies
    11
    Views
    3,618

    Re: Jtable retruning nulls

    It should be
    1
    2
    3
    .
    .

    Like a spreadsheet
  22. Replies
    11
    Views
    3,618

    Jtable retruning nulls

    I have this code here:


    try{
    for(int i=0; i<=rows;++i)
    {
    if (Integer.parseInt(StatsTable.getValueAt(i,0).toString()) != 0)
    ...
  23. Thread: Jtable inquiry

    by Azoth
    Replies
    0
    Views
    2,783

    Jtable inquiry

    I have a jtable with 4 columns. Is the first column
    labelled column 0 like in java arrrays or is it labelled 1 ?
  24. Replies
    5
    Views
    2,262

    Re: Jtable returning null pointer exception .

    I tried your suggestion.Jtable still throws NullPointerException
  25. Replies
    5
    Views
    2,262

    Re: Jtable returning null pointer exception .

    How do you do that?
    I decided to embed my code in a try-catch block.
Results 1 to 25 of 54
Page 1 of 3 1 2 3





Click Here to Expand Forum to Full Width

Featured