How to extend JTable

Hello. I'm using Selena, latest EAP. I try to create custom Component. Specifically I try to extend JTable.

So, I create a class, extend it from JTable, add my own properties, compile, add it to UI Designer panel, drag to a form... but no new properties in the UI Designer Properties Pane.

What do I need to do to?

What do I need? Simply extend JTable with several small things, like predefined column widths. It's easy to do without UIDesigner, but what do I need to create to make it work there?

Thanks.

0
7 comments
Avatar
Permanently deleted user

Hello Alexander,

Hello. I'm using Selena, latest EAP. I try to create custom Component.
Specifically I try to extend JTable.

So, I create a class, extend it from JTable, add my own properties,
compile, add it to UI Designer panel, drag to a form... but no new
properties in the UI Designer Properties Pane.

What do I need to do to?

What do I need? Simply extend JTable with several small things, like
predefined column widths. It's easy to do without UIDesigner, but what
do I need to create to make it work there?


What is the type of the properties you have added?

--
Dmitry Jemerov
Software Developer
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0

Several arrays of integer and Color.

0
Avatar
Permanently deleted user

Hello Alexander,

Several arrays of integer and Color.


Arrays of integer are currently not supported because there is no viewing/editing
UI for array properties. The color properties should be visible if you have
correctly defined public getter and setter methods.

--
Dmitry Jemerov
Software Developer
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0

Hmm, and can I define editor? Through BeanInfo or something else?
I tried to define String property and I cannot see it too.

Do I need to restart Idea/reload project after I recompiled my Table class?

0
Avatar
Permanently deleted user

Hello Alexander,

Hmm, and can I define editor? Through BeanInfo or something else? I
tried to define String property and I cannot see it too.


There's currently no pluggability for defining editors. It's likely that
we'll add BeanInfo support some day, but it's not supported now.

Do I need to restart Idea/reload project after I recompiled my Table
class?


You need to press the "Reload custom components" button on the UI Designer
toolbar.

--
Dmitry Jemerov
Software Developer
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0

Ok. I've understood everything I want. Thanks.

0

And how can I assign "helpful" or "answered" status to your reply? I do not see buttons "next to a message"…

0

Please sign in to leave a comment.