Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > More E-Book Readers > iRex > iRex Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 05-18-2007, 04:53 AM   #16
tororebelde
No es el toro que piensas
tororebelde began at the beginning.
 
tororebelde's Avatar
 
Posts: 44
Karma: 10
Join Date: Mar 2007
Device: iRex iliad
Scotty, are you trying that Button or Label classes from the microedition xlets package or have you managed to finally use some of the AWT stuff we miss from Tao Group?

Just curious how you are doing your tests

Last edited by tororebelde; 05-18-2007 at 04:54 AM. Reason: typo :P
tororebelde is offline   Reply With Quote
Old 05-18-2007, 11:19 AM   #17
scotty1024
Banned
scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.
 
Posts: 1,300
Karma: 1479
Join Date: Jul 2006
Location: Peoples Republic of Washington
Device: Reader / iPhone / Librie / Kindle
Non xlet, I've been assembling together a set of light weight AWT classes to fill-in-the-holes for Desktop application development.

My current test case...

Code:
import java.awt.Button;
import java.awt.Color;
import java.awt.BorderLayout;
import java.awt.CardLayout;
import java.awt.FlowLayout;
import java.awt.Frame;
import java.awt.Graphics;
import java.awt.Insets;
import java.awt.Label;
import java.awt.Panel;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import com.irex.sdk.DisplayUpdate;

public class test3 extends Frame implements ActionListener {

    Button button;
    Button button2;
    Button button3;
    Label label;
    Label label2;
    Label label3;
    Panel panel;

    public test3() {
        setSize(768, 935);

        setLayout(new FlowLayout());
        //setLayout(new CardLayout());

        //      panel = new Panel(new BorderLayout());
        panel = new Panel();

        label = new Label("A Label");
        label2 = new Label("A Longer Label", Label.RIGHT);
        label3 = new Label("A Quick Brown Fox Jumped", Label.CENTER);
        //      add(label);

        button = new Button("Test");
        button.setActionCommand("CLOSE");
        button.addActionListener(this);
        button2 = new Button("Test 2");
        button3 = new Button("Test 3");

        //      add(button);
        //      add(label);

add(button);
//button.setBounds(100, 10, 200, 60);
add(label);
//label.setBounds(10, 10, 200, 60);
add(button2);
//button2.setBounds(100, 100, 200, 60);
add(label2);
//label2.setBounds(10, 100, 200, 60);
add(button3);
//button3.setBounds(100, 200, 200, 60);
add(label3);
//label3.setBounds(10, 200, 200, 60);

        //      panel.setSize( 400, 400);
        //      Location( 100, 100);

//      add(panel);
        pack();

        System.out.println("Panel size: " + panel.getBounds());
        System.out.println("Frame size: " + getBounds());

        //      setSize(768, 935);
        //      button.setLocation(100, 100);
        //      label.setLocation(100, 300);

        setVisible(true);
        DisplayUpdate.dispMainWinFullQ();
    }

    public void actionPerformed(ActionEvent e) {
        String command = e.getActionCommand();
        if (command.equals("CLOSE")) {
            System.exit(0);
        }
    }

    public static void main(String[] args) {
        test3 test = new test3();
    }

}
scotty1024 is offline   Reply With Quote
Advert
Reply


Forum Jump


All times are GMT -4. The time now is 09:16 PM.


MobileRead.com is a privately owned, operated and funded community.