3 Replies - 1599 Views - Last Post: 25 March 2013 - 03:51 PM Rate Topic: -----

#1 qadeerhussain007   User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 35
  • Joined: 05-July 12

Look and feel problem

Posted 25 March 2013 - 03:56 AM

Hello friends i am making a download manager and i am using a jtable for manage download to show the progress in the jtable i am using the table cellrendere
public class TableRender implements TableCellRenderer
{

    @Override
    public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
        return (JProgressBar) value;
    }
    
}


now due to the TableCellRenderer nimbus look and feel is not working can any one tell me the problem or sujjestion any other look and feel

Is This A Good Question/Topic? 0
  • +

Replies To: Look and feel problem

#2 macosxnerd101   User is offline

  • Games, Graphs, and Auctions
  • member icon




Reputation: 12800
  • View blog
  • Posts: 45,992
  • Joined: 27-December 08

Re: Look and feel problem

Posted 25 March 2013 - 05:55 AM

Moved to Java. Please do not post help questions in Advanced Discussion.

You'll have to be more specific as to what is "not working." It may also be helpful to provide a snippet that demonstrates your problem and is runnable.
Was This Post Helpful? 0
  • +
  • -

#3 pbl   User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8381
  • View blog
  • Posts: 31,956
  • Joined: 06-March 08

Re: Look and feel problem

Posted 25 March 2013 - 09:46 AM

All the JTable is filled with JProgressBar as you cast to JProgressBar all queries for any row or column ?
And you return input as if it was a JProgressBar, it is effectively a JProgressBar value that can be implemented as a String or an Integer) so you have to return a JProgressBar which has a value of value... better to have your vlass to extends JProgressBar and return "this" after having set the value

This post has been edited by pbl: 26 March 2013 - 03:51 AM

Was This Post Helpful? 0
  • +
  • -

#4 blackcompe   User is offline

  • D.I.C Lover
  • member icon

Reputation: 1159
  • View blog
  • Posts: 2,547
  • Joined: 05-May 05

Re: Look and feel problem

Posted 25 March 2013 - 03:51 PM

Quote

now due to the TableCellRenderer nimbus look and feel is not working can any one tell me the problem or sujjestion any other look and feel


Did the problem start after you applied the LAF? There a ton of examples showing how to use a JProgressBar in a JTable.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1