GUI Designer & JTable: Does it work?
I've been trying to get a very simple JTable example to work using the GUI Designer in Idea 5. The code works without using the GUI designer so I know it is not a code issue. Does anyone have the simplest of examples to show that using JTables with the GUI designer works? I'm beginning to think it does not even work. Of course, the problem will no doubt end up being me.....
Thank You
请先登录再写评论。
I think the GUI designer has been mostly abandoned. It's pretty hard to use.
Your problem is probably that you aren't adding the root panel to your JFrame or
whatever your window object is. I usually do something like this:
class Whatever extends JFrame {
/* UI form bound */ JPanel mainPanel;
/* UI form bound */ JTable table;
{
getContentPane().setLayout(new BorderLayout());
getContentPane().add(mainPanel);
}
}
cnuk wrote:
Hello cnuk,
See here: ftp://intellij.net/pub/.idea/JTableSample.zip
--
Serge Baranov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"