🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #13292

Re: Can JSplitPane use containers?

#13292
From: Simon Andersson
Date: Thu, 20 Aug 1998 00:00
50 lines
2333 bytes
Hi.

Check that you dropped the containers on the UI node so that you don't add
them to the frame or applet. After that it should be possible to select them
as the left and right components (maybe it's possible anyway if you dropped
them on the frame but it probably becomes a mess).

In my example here I'm putting a panel as the left component and a
tabbedpane with two pages as the right component.

Hope this helps,
Simon

// Code generated by jbuilder in top of applet
  BorderLayout borderLayout1 = new BorderLayout();
  JSplitPane jSplitPane1 = new JSplitPane();
  JPanel jPanel1 = new JPanel();
  JTabbedPane jTabbedPane1 = new JTabbedPane();
  JPanel jPanel2 = new JPanel();
  JPanel jPanel3 = new JPanel();

  private void jbInit() throws Exception {
    this.setLayout(borderLayout1);
    jSplitPane1.setRightComponent(jTabbedPane1);
    jSplitPane1.setLeftComponent(jPanel1);
    this.add(jSplitPane1, BorderLayout.CENTER);
    jTabbedPane1.addTab("jPanel2", jPanel2);
    jTabbedPane1.addTab("jPanel3", jPanel3);
}

mnemonic wrote in message <35BF55CE.15722C62@mmc.mmu.ac.uk>...
>Hi there,
>
>I am trying to figure out how to use the JSplitPane component. I can see
>how to specify which components one wants to use with it using the
>leftComponent and rightComponent
>properties. However, since I am trying to create a browser-style front
>end, I would need to put a JScrollPane  object (embedding a JTree
>object) on the left, and a JPane object on the right, so that I can
>dynamically add/remove components on the JPane object according to
>selected nodes from the tree (therefore left and right objects are
>containers not just components).
>
>I can't manage to make it work this way. Does anybody know a work
>around?
>
>Thanks in advance,
>
>Yann Le Locat
>
Technical Details
Message-ID: <6rgkvg$8m6@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <35BF55CE.15722C62@mmc.mmu.ac.uk>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,2abf2c299916c638,start
X-Google-Attributes: gid111d45,public
From: "Simon Andersson" <simon@acacia.se>
Subject: Re: Can JSplitPane use containers?
Date: 1998/08/20
Message-ID: <6rgkvg$8m6@forums.borland.com>
X-Deja-AN: 382925454
References: <35BF55CE.15722C62@mmc.mmu.ac.uk>
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4
Organization: Another Netscape Collabra Server User
Newsgroups: borland.public.jbuilder.java.swing