Search:

Type: Posts; User: Bebras

Search: Search took 0.11 seconds.

  1. Replies
    22
    Views
    1,619

    Re: JTable custom model listener

    Well first of all, I finally got it to work. Credits to you ofcourse.

    These "strategies" you were talking about ? Can you give me an example? Now I just set the button's text to the same text as...
  2. Replies
    22
    Views
    1,619

    Re: JTable custom model listener

    Well but my button renderer does return "",
    @Override
    public Object getCellEditorValue() {
    return "";
    }
    Your scenario sounds great and I'm pretty sure I'll want to add more buttons with...
  3. Replies
    22
    Views
    1,619

    Re: JTable custom model listener

    You are right. Should I just check if it is a valid index? But somehow that doesn't sound correct. What value does it have to return for a button? Because I just return an element from the array...
  4. Replies
    22
    Views
    1,619

    Re: JTable custom model listener

    Okay. So I used the setModelIndex method and got an array index out of bounds exception.

    JTable has a construtor JTable(int numRows, int numColumns), so I set tthe number of colums to the size of...
  5. Replies
    22
    Views
    1,619

    Re: JTable custom model listener

    Yes. The text "Button clicked" is printed
  6. Replies
    22
    Views
    1,619

    Re: JTable custom model listener

    No. The button is still not selectable.
    JTable list = new JTable();
    list.setModel(new BanListTableModel(data,columnames));
    TableButton button = new TableButton("Atbaninti");...
  7. Replies
    22
    Views
    1,619

    Re: JTable custom model listener

    2610
    Just to be sure.
  8. Replies
    22
    Views
    1,619

    Re: JTable custom model listener

    Yes that is right. Why do you say "conceptually"? How it isn't correct?
  9. Replies
    22
    Views
    1,619

    Re: JTable custom model listener

    new problem!
    I also wanted to add a button as a cell, so I created a "TableButton" class which extends JButton and implements TableCellEditor AND TableCellRenderer.
    All is great except that I want...
  10. Replies
    22
    Views
    1,619

    JTable custom model listener

    Hello, I created a default JTable and added a listener to it. Everything worked great. But the default model wasn't good enought, so I created my own. And once I change data nothing happens.

    My...
Results 1 to 10 of 10