import javax.microedition.midlet.*;
import com.sun.lwuit.*;
import com.sun.lwuit.events.*;
import com.sun.lwuit.layouts.BorderLayout;
import com.sun.lwuit.layouts.BoxLayout;
public class LwuitTabbedPane extends MIDlet implements ActionListener {
public void startApp() {
Display.init(this);
Form f = new Form("Lwuit TabbedPane");
f.setLayout(new BorderLayout());
Command exitCommand = new Command("Exit");
f.addCommand(exitCommand);
f.setCommandListener(this);
f.setTitle("Lwuit TabbedPane");
TabbedPane tp = new TabbedPane();
tp.addTab("Tab 1", new Label("LWUIT: TabbedPane"));
Container tabPanel = new Container(new BoxLayout(BoxLayout.Y_AXIS));
RadioButton radioButton1 = new RadioButton("Radio Button 1");
RadioButton radioButton2 = new RadioButton("Radio Button 2");
RadioButton radioButton3 = new RadioButton("Radio Button 3");
ButtonGroup buttonGroup1 = new ButtonGroup();
buttonGroup1.add(radioButton1);
buttonGroup1.add(radioButton2);
buttonGroup1.add(radioButton3);
tabPanel.addComponent(radioButton1);
tabPanel.addComponent(radioButton2);
tabPanel.addComponent(radioButton3);
RadioButton radioButtonA = new RadioButton("Radio Button A");
RadioButton radioButtonB = new RadioButton("Radio Button B");
ButtonGroup buttonGroup2 = new ButtonGroup();
buttonGroup2.add(radioButtonA);
buttonGroup2.add(radioButtonB);
tabPanel.addComponent(radioButtonA);
tabPanel.addComponent(radioButtonB);
tp.addTab("Tab 2", tabPanel);
f.addComponent(BorderLayout.CENTER, tp);
f.show();
}
public void pauseApp() {}
public void destroyApp(boolean unconditional) {}
public void actionPerformed(ActionEvent ae) {
notifyDestroyed();
}
}