Article View: borland.public.jbuilder.java.swing
Article #9121Re: JPanel not showing
From: Shabber Abbas
Date: Fri, 26 May 2000 00:00
Date: Fri, 26 May 2000 00:00
52 lines
2230 bytes
2230 bytes
Sorry I meant nesting,
here is the jbinit
BTW GantChartLabel extends JPanel
// Instantiating the label in question
GantChartLabel testLabel = new GantChartLabel();
// The relevant material is here
private void jbInit() throws Exception {
this.getContentPane().add(InitialJPanel);
InitialJPanel.setLayout(InitialJPanelxYLayout);
InitialJPanelxYLayout.setHeight(390);
InitialJPanelxYLayout.setWidth(689);
InitialJPanel.add(GantChartJScrollPane, new XYConstraints(0, 35, 700,
284));
ViewOptionJPanel.setLayout(ViewOptionJPanelxYLayout);
ViewOptionJPanel.setBackground(SystemColor.desktop);
GantChartJScrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
GantChartJScrollPane.getViewport().add(GantChartJPanel, null);
GantChartJPanel.setLayout(GantChartJScrollPanexYLayout);
GantChartJPanel.add(GantChartViewerJScrollPane, new XYConstraints(150, 0,
547, 281));
GantChartViewerJScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_NEVER);
GantChartViewerJScrollPane.getViewport().add(GantChartViewerJPanel, null);
GantChartViewerJPanel.setLayout(GantChartViewerJPanelxYLayout);
GantChartViewerJPanel.setOpaque(true);
GantChartViewerJPanel.add(TimeDivisionJPanel, new XYConstraints(0, 0, 529,
20));
GantChartViewerJPanel.add(GantChart, new XYConstraints(0, 20, 529, 258));
GantChart.setBackground(Color.lightGray);
GantChart.setLayout(GantChartxYLayout);
GantChart.add(testLabel, new XYConstraints(79, 100, 71, 50));
testLabel.setBackground(Color.green);}
Thanks
Technical Details
Message-ID:
<392EBA1C.2CE412B8@codetech.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<392E9A66.C2C21991@codetech.com> <392EB7EA.C877CA56@home.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,9f2c385dedd655fb X-Google-Attributes: gid111d45,public From: Shabber Abbas <shabber@codetech.com> Subject: Re: JPanel not showing Date: 2000/05/26 Message-ID: <392EBA1C.2CE412B8@codetech.com> X-Deja-AN: 627674457 Content-Transfer-Encoding: 7bit References: <392E9A66.C2C21991@codetech.com> <392EB7EA.C877CA56@home.com> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Organization: Another Netscape Collabra Server User Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.swing