Hallo Zusammen,
kann mir einer sagen warum der Title vom JTable nicht angezigt wird.
kann mir einer sagen warum der Title vom JTable nicht angezigt wird.
Java:
getContentPane().add(pnlCenter,BorderLayout.CENTER);
pnlCenter.setPreferredSize(new Dimension(400, 800));
pnlCenter.setBorder(new TitledBorder(new LineBorder(new Color(0, 0, 0), 2), "Schachteleditor", TitledBorder.LEADING, TitledBorder.BELOW_TOP, null, new Color(0, 0, 0)));
pnlCenter.setLayout(new BorderLayout(0, 0));
JScrollPane sclpCenter = new JScrollPane();
sclpCenter.setLocation(new Point(20, 5));
sclpCenter.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
sclpCenter.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
pnlCenter.add(sclpCenter);
sclpCenter.setViewportView(pnlSchachtel0);
GroupLayout gl_pnlSchachtel0 = new GroupLayout(pnlSchachtel0);
gl_pnlSchachtel0.setHorizontalGroup(
gl_pnlSchachtel0.createParallelGroup(Alignment.LEADING)
.addGroup(gl_pnlSchachtel0.createSequentialGroup()
.addContainerGap()
.addComponent(panel_1, GroupLayout.DEFAULT_SIZE, 603, Short.MAX_VALUE)
.addContainerGap())
);
panel_1.setBorder(new TitledBorder(null, "Schachtel 0", TitledBorder.LEADING, TitledBorder.TOP, null, null));
gl_pnlSchachtel0.setVerticalGroup(
gl_pnlSchachtel0.createParallelGroup(Alignment.LEADING)
.addGroup(gl_pnlSchachtel0.createSequentialGroup()
.addContainerGap()
.addComponent(panel_1, GroupLayout.PREFERRED_SIZE, 195, GroupLayout.PREFERRED_SIZE)
.addContainerGap(571, Short.MAX_VALUE))
);
table.setModel(new DefaultTableModel(
new Object[][] {
{null, null},
{null, null},
},
new String[] {
"Spalte1", "Spalte2"
}
));
table.setPreferredSize(new Dimension(200, 160));
GroupLayout gl_panel_1 = new GroupLayout(panel_1);
gl_panel_1.setHorizontalGroup(
gl_panel_1.createParallelGroup(Alignment.LEADING)
.addGroup(gl_panel_1.createSequentialGroup()
.addComponent(table, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.addPreferredGap(ComponentPlacement.RELATED, 214, Short.MAX_VALUE)
.addComponent(chckbxNewCheckBox, GroupLayout.PREFERRED_SIZE, 148, GroupLayout.PREFERRED_SIZE)
.addGap(41))
);
gl_panel_1.setVerticalGroup(
gl_panel_1.createParallelGroup(Alignment.LEADING)
.addGroup(gl_panel_1.createSequentialGroup()
.addGroup(gl_panel_1.createParallelGroup(Alignment.LEADING)
.addComponent(table, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.addGroup(gl_panel_1.createSequentialGroup()
.addGap(7)
.addComponent(chckbxNewCheckBox)))
.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
panel_1.setLayout(gl_panel_1);
pnlSchachtel0.setLayout(gl_pnlSchachtel0);