|
|
JTable Column with Multiple Types
I'm very new to Java Swing and I'm trying to create a JTable. I need a
column of the table to display multiple types, such as a String in row
1, a JComboBox in row2, and a JRadioButton in row 3 for example.
I'm working on an editor of sorts and I need to create a table to
display the properties of a selected component. Something like a 2
column Property/Value Table where the value may be any object such as a
string, a list of possible values in a comboBox, etc.
Any help or code snipets would be greatly appreciated!
|
|
0
|
|
|
|
Reply
|
MikeSmith813
|
4/14/2006 12:59:32 AM |
|
see
http://www.projectcool.com/tips/Tip/15851
--
Message posted via JavaKB.com
http://www.javakb.com/Uwe/Forums.aspx/java-gui/200604/1
|
|
0
|
|
|
|
Reply
|
judith
|
4/14/2006 11:19:18 AM
|
|
MikeSmith813@gmail.com wrote:
> I'm very new to Java Swing and I'm trying to create a JTable. I need a
> column of the table to display multiple types, such as a String in row
> 1, a JComboBox in row2, and a JRadioButton in row 3 for example.
>
> I'm working on an editor of sorts and I need to create a table to
> display the properties of a selected component. Something like a 2
> column Property/Value Table where the value may be any object such as a
> string, a list of possible values in a comboBox, etc.
>
> Any help or code snipets would be greatly appreciated!
>
I see here 2 ways:
1. May be you want to change table structure -
instead of having table with 2 columns (property name - value)
you may have table with 2 rows (name - value) or even with one row
and column header as "names" part.
2. Override
JTable:public Component prepareRenderer(TableCellRenderer renderer, int
row, int column)
where you may return component you want.
If you want your table to be editable see prepareEditor.
|
|
0
|
|
|
|
Reply
|
Vova
|
4/17/2006 1:46:08 PM
|
|
|
2 Replies
726 Views
(page loaded in 0.056 seconds)
Similiar Articles: JTable Column with Multiple Types - comp.lang.java.guiI'm very new to Java Swing and I'm trying to create a JTable. I need a column of the table to display multiple types, such as a String in row 1, a JC... multiple data types in column? - comp.databases.mysqlJTable Column with Multiple Types - comp.lang.java.gui multiple data types in column? - comp.databases.mysql How to combine types from multiple rows - comp.soft-sys.sas ... How to combine types from multiple rows - comp.soft-sys.sas ...multiple data types in column? - comp.databases.mysql JTable Column with Multiple Types - comp.lang.java.gui multiple data types in column? - comp.databases.mysql How to ... Swing skeleton app - comp.lang.java.guiHi All, I am working on a Swing app (currently running 1.5, going to ... JTable Column with Multiple Types 2 181 MikeSmith813 Selecting a row in a JTable - comp.lang.java.guiHow to disable moving(rearrange) the columns in a JTable? - comp ... JTable with ... row, column, or cell can be made. See Enabling Single or Multiple Selections in a JTable ... Hyperlink inJtable cells - comp.lang.java.guiI would like to render text inside JTable column cells as Hyperlinks (so the hand ... Also handling multiple links from single cell is also feasible. Some minor things ... Problems with JTable using fixed rows - comp.lang.java.gui ...The multiple JTables with a common TableColumnModel ... section of http://www.chka.de/swing/table/column-headers/JTable ... From Excel - Access Create Wrong Data Type - comp ... JTable and input methods (or, and: focus in JTextField) - comp ...The dictionary editor is essentially a JTable. The first column holds the word in English, the ... return r; } But that doesn't _quite_ work: when the user types the first ... add row names to JTable + multiple Jtable instances - comp.lang ...Drawing columns headers of a JTable - comp ... How to add Header information to a SOAP ... ... Re: add row names to JTable + multiple Jtable instances Hi you can use this code ... how to write multi column listbox? - comp.lang.java.guiHi, I want to create a lightweighted multi column listbox in java, preferably without swing. If use JTable ... Headers In Multiple Column Reports - And Hiding On No data ... JTable Column with Multiple Types - comp.lang.java.gui | Computer ...I'm very new to Java Swing and I'm trying to create a JTable. I need a column of the table to display multiple types, such as a String in row 1, a JC... How Do I Create a JTable With Multiple Column Headers? | eHow.comThe Java programming language has a library of graphical user interface design tools known as Swing. You can use Swing to display information in a number of ways ... 7/24/2012 8:48:23 AM
|
|
|
|
|
|
|
|
|