home *** CD-ROM | disk | FTP | other *** search
/ CD Actual Thematic 7: Programming / CDAT7.iso / Share / Java / JDesignerPro / Jdp3_0.exe / data1.cab / Program_Files / SimpleInstance.class (.txt) < prev    next >
Encoding:
Java Class File  |  1999-04-09  |  2.6 KB  |  43 lines

  1. import java.awt.BorderLayout;
  2. import java.awt.Button;
  3. import java.awt.Container;
  4. import java.awt.Font;
  5. import java.awt.Panel;
  6.  
  7. public class SimpleInstance extends JDPClassLayout {
  8.    JDPUser user;
  9.    JDPJagg jaggSQL;
  10.    JDPPopupMessage popuppanel;
  11.    JDPMaskEdit JDPMaskEditMain;
  12.    String moduleParameter;
  13.    Panel Main;
  14.    String String1;
  15.    Button Button1;
  16.    JDPRichText RichText1;
  17.  
  18.    public void InitClass(JDPUser var1, Panel var2, String var3) {
  19.       this.user = var1;
  20.       this.moduleParameter = var3;
  21.       this.jaggSQL = new JDPJagg(var1.jaggPath);
  22.       ((Container)this).setLayout(new BorderLayout());
  23.       this.popuppanel = new JDPPopupMessage(var1, this);
  24.       ((Container)this).add(this.popuppanel);
  25.       this.JDPMaskEditMain = new JDPMaskEdit();
  26.       this.Main = new Panel();
  27.       this.String1 = new String("Press Here");
  28.       this.Button1 = new Button(this.String1);
  29.       this.RichText1 = new JDPRichText(var1);
  30.       this.Main.setLayout(new BorderLayout());
  31.       ((Container)this).add("Center", this.Main);
  32.       this.Main.add("South", this.Button1);
  33.       this.Main.add("Center", this.RichText1);
  34.       this.RichText1.setFont(new Font("Helvetica", 0, 12));
  35.       this.RichText1.setText("This sample uses the java.lang.String class to create a new String object called String1. The Instance Manager is used to create the String and initialize it to 'Press Here'. Then the java.awt.Button class is used to create a new Button. The Instance Manager is used to create the new instance using String1 as the parameter. This results in a new Button with the text 'Press Here' as you see below. To see the Instance Manager settings for String1 or Button1 select the component in the Layout View and press the Instance Manager button (2nd from left on the left middle of this screen). This is a simple example of how the Instance Manager is used to create new instances of objects that are imported into JDesignerPro.");
  36.       this.InitComponents();
  37.       var1.gParm.addElement(this);
  38.    }
  39.  
  40.    public void InitComponents() {
  41.    }
  42. }
  43.