Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.gui > #1488

How to write an "user con

From "clearlight" <clearlight@THRWHITE.remove-dii-this>
Subject How to write an "user con
Message-ID <1176926289.351401.305560@y5g2000hsa.googlegroups.com> (permalink)
Newsgroups comp.lang.java.gui
Date 2011-04-27 15:33 +0000
Organization TDS.net

Show all headers | View raw


  To: comp.lang.java.gui
Hi.

Being new to Java and coming from VB, I decided to call it "user
control", although I don't know how I should call it in this new world
(is it a "Widget"?)

If I write a test class extending JPanel, and add the component to it
simply like:

  public TestPanel() {
    super();
    elCodeBox = new CodeBox("Cuentas", "Codigo", "titulo");
    elCodeBox.setVisible(true);
    this.add(elCodeBox);
  }

the component shows perfectly.

But I am using NetBeans, and if one wants to use the designer one has
to add it as a "JPanel Form". NetBeans inserts a lot of read only code
to deploy components according to a layout (and does a good job with
it). But after all that code has been executed, the simple way to add
a component to the frame doesn't work anymore.

So, my solution would be how to add a new option to the component
panel of NetBeans, or else how to add a component to a heavily laid
out panel.

I did some searching on the Web, but no solution works on NetBeans
generated panels.


Thanks

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

Back to comp.lang.java.gui | Previous | Next | Find similar | Unroll thread


Thread

How to write an "user con "clearlight" <clearlight@THRWHITE.remove-dii-this> - 2011-04-27 15:33 +0000

csiph-web