Win a copy of Kotlin for Android App Development this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Devaka Cooray
  • Jeanne Boyarsky
  • Bear Bibeault
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • salvin francis
  • Carey Brown
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Rendering problem  RSS feed

Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys,

Iam developing under java swing and found it difficult to achieve the following goals which I wanted to.

Iam rendering JTable with combobox.
Somethings which I want is still not happening and I dont know why?

Iam attaching an image also along with this.

How could I achieve the following things.

[1] The "First" and "Last" column show the same comboItem.Want the comboitem in the "Last" column to be last.Is using only 1 renderer and editor for both the columns. Need only 1 selection in the cell(yellow background)

[2]The table cells shouldnt display the comboitems.They should be blank.Only when the user selects a comboitem from the combobox,then only it should be displayed in the corresponding cell.

[3]The Table "setValue" call from the button is not changing the cell value.As you can see in the "getTableCellRendererComponent".Iam using the table value.
How could this be done?The comboboxes are noneditable.

This code is compilable.Would be nice if anyone could point out the changes that should be made in the current code.Would really appreciate it

Thanks in advance..
Men call me Jim. Women look past me to this tiny ad:
Programmatically Create PDF Using Free Spire.PDF with Java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!