/*
This file was "HTMLized" by VasJava2HTML.
For more information visit VasJava2HTML page
(C) 1997, 1998, 1999, 2000 Vasile Calmatui
*/
/*
This file was "LiteObfuscated" by VasObfuLite.
For more information visit http://www.chez.com/vasile/obfu/VasObfuLite.html
(C) 1999, 2000 Vasile Calmatui
*/
/**************************************************************\
* Copyright (C) 1997 - 2001 Vasile CALMATUI *
* *
* This software is public domain. Permission is granted to *
* use, copy and modify this software to anyone. *
****************************************************************
* Please don't contact me for information, bugs, comments, job *
* offers. If you like this software, please send a postcard to *
* the following address: *
* Vasile CALMATUI *
* 35 str. Burebista *
* 3600 Ungheni *
* MOLDOVA *
****************************************************************
* The author is not liable for damages resulting from the use *
* of this software or its derivates. *
\**************************************************************/
//Sample Applet of VasTabs
import VasTabs;
import java.applet.Applet;
import java.awt.*;
public class VasTabsApplet extends Applet {
VasTabs a, b, c, d, f, g, h, i, j;
Panel k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, bb, bc, bd, be, bf, bg;
Label bh, bi, bj;
Button bk;
TextField bl;
public String getAppletInfo() {
return (new String("VasTabsApplet v3.1 February 13th, 1999, (C) 1997, 1998, 1999, 2000, 2001 Vasile Calmatui"));
}
//constructor
public VasTabsApplet() {
this.setLayout(null);
this.resize(400, 400);
setBackground(Color.lightGray);
//where is the left upper corner of tabs=(25, 25)
//the dimension of tabs=(350, 350)
a=new VasTabs(25, 25, 350, 350);
//Creating the Panel
k=new Panel();
k.setLayout(null);
q=new Panel();
r=new Panel();
b=new VasTabs(20, 10, 140, 65, 1);
b.addTab("Width", q);
b.addTab("of 1", r);
k.add(b);
s=new Panel();
t=new Panel();
c=new VasTabs(180, 10, 140, 65, 2);
c.addTab("Width", s);
c.addTab("of 2", t);
k.add(c);
u=new Panel();
v=new Panel();
d=new VasTabs(20, 85, 140, 65, 3);
d.addTab("Width", u);
d.addTab("of 3", v);
k.add(d);
w=new Panel();
x=new Panel();
f=new VasTabs(180, 85, 140, 65, 4);
f.addTab("Width", w);
f.addTab("of 4", x);
k.add(f);
y=new Panel();
z=new Panel();
g=new VasTabs(20, 160, 140, 65, 5);
g.addTab("Width", y);
g.addTab("of 5", z);
k.add(g);
bb=new Panel();
bc=new Panel();
h=new VasTabs(180, 160, 140, 65, 6);
h.addTab("Width", bb);
h.addTab("of 6", bc);
k.add(h);
bd=new Panel();
be=new Panel();
i=new VasTabs(20, 235, 140, 65, 7);
i.addTab("Width", bd);
i.addTab("of 7", be);
k.add(i);
bf=new Panel();
bg=new Panel();
j=new VasTabs(180, 235, 140, 65, 8);
j.addTab("Width", bf);
j.addTab("of 8", bg);
k.add(j);
//Creating the Panel
l=new Panel();
l.setLayout(null);
bh=new Label("You can add anything in the panels");
bh.reshape(10, 30, 300, 25);
l.add(bh);
bk=new Button("Remove Red tab");
bk.reshape(10, 60, 150, 30);
l.add(bk);
bl=new TextField("TextField");
bl.reshape(10, 100, 150, 25);
l.add(bl);
//Creating the Panel
m=new Panel();
m.setLayout(null);
bi=new Label("This is Tab 2");
bi.reshape(10, 60, 300, 25);
m.add(bi);
//Creating the Panel
n=new Panel();
n.setLayout(null);
bj=new Label("Please don't remove me");
bj.reshape(10, 90, 300, 25);
n.add(bj);
o=new Panel();
p=new Panel();
//adding the tabs
a.addTab("Test", k);
a.addTab("One", l);
a.addTab("2", m);
a.addTab("Red", n);
a.setColorTab("Red", Color.red);
n.setBackground(Color.red);
a.addTab("Disabled", o);
a.addTab("if unregistered", p);
add(a);
}//end constructor
public boolean handleEvent(Event bm) {
//if clicked on button, remove red panel
if(bm.target==bk && (bm.arg==bk.getLabel())) {
bk.disable();
a.removeTab("Red");
a.refreshTabs();
return true;
}//end if
return false;
}//end handleEvent
}//end class VasTabsApplet
© 1997, 1998, 1999, 2000 made with VasJava2HTML