Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Table header renderer

 
Romeo Son
Ranch Hand
Posts: 92
Android Eclipse IDE Suse
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello ranchers,

What do you think, am I allowed in my assignment (B&S)to subclass DefaultTableCellHeaderRenderer to render my column headers nicely, as in Java 5 and 6 (not sure for previous platforms) the class is defined in sun.swing.table package (that is part of jre).

Thanks in advance for your answers.

Regards,
Romeo
 
Mihai Radulescu
Ranch Hand
Posts: 918
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Romeo

I do the same, I also have a CellRender, but only for the table not fot the table header.

Regards M
 
Romeo Son
Ranch Hand
Posts: 92
Android Eclipse IDE Suse
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mihai,

I do the same, I also have a CellRender, but only for the table not fot the table header.


This means that your table renders the column names directly from your table model, right?

My concern is that if I use DefaultTableCellRenderer to render my column headers, they are not rendered as nicely as with DefaultTableCellHeaderRenderer. But the last class is a member of sun.swing.table package and I'm afraid I can get an automatic failure or something if I use it.

Thanks for your reply,

Regards,
Romeo

[ March 30, 2007: Message edited by: Romeo Son ]
[ March 30, 2007: Message edited by: Romeo Son ]
 
Mihai Radulescu
Ranch Hand
Posts: 918
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I use the default header render, you can take a look on one my previous GUI stage.
see the link :
http://www.coderanch.com/t/188394/java-developer-SCJD/certification/tips-gui-please

You can use sing classes (preferably) but you can also add you own but don't forget to argue this in your choices.txt.
 
Romeo Son
Ranch Hand
Posts: 92
Android Eclipse IDE Suse
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mihai,

Thanks for your reply and the link, your GUI looks very professional.
I will drop out that default header renderer from sun and make one of my own.
Regarding the GUI, I have added two more buttons, prev, next, to fetch only a limited amount of records, ten fifteen per page (Maybe I will make this number editable). Have you considered this, is it worth adding this programming overhead?

Regards,

Romeo
 
Lucy Hummel
Ranch Hand
Posts: 232
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Romeo Son:
[QB]Hi Mihai,

Hi Romeo,

To load not all records is a good decision.

Even it is a good one I am not going to implement that. The reason for that is:

  • more code that can contain errors
  • not a requirement


  • I want to start why I vote against this option.
     
    Romeo Son
    Ranch Hand
    Posts: 92
    Android Eclipse IDE Suse
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Hi Hummel,

    You are right, I will drop off that idea of having prev/next buttons for the sake of this assignment.

    Thanks,

    Romeo
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic