Skip to main content

LWUIT Theme Creator with create UI option

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
1 reply [Last post]
srirampani
Offline
Joined: 2010-08-15

Hi,
I am facing following issue:
- using LWUIT I am not able to create a fresh form
- not able to load the .res file
Please can any one help to get the LWUIT resource editor with UI create option.
As per a you tube demo create UI is visible. Not even in LWUIT 4.x is also not present.

Regards,
Sriram

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Bhavdip
Offline
Joined: 2011-03-31

hi to create form using lwuit .res file see one example
if you have lwuit zip then inside util you got one editer for UI theme design where you can create you own design and save it .res file now open ide and past it
inside /res directory make sure that you must add lwuit.jar means api that help to build ui component for cross platfrom device.
to add lwuit.jar copy it from lwuit1.4.zip and past inside resource in your project now ready to run following helloworld

import javax.microedition.midlet.*;

import com.sun.lwuit.*;
import com.sun.lwuit.events.*;

public class HelloLWUITMidlet extends MIDlet implements ActionListener {
    public void startApp() {
      Display.init(this);

      Form f = new Form("Hello, LWUIT!");
      f.show();
     
      Command exitCommand = new Command("Exit");
      f.addCommand(exitCommand);
      f.setCommandListener(this);
    }

    public void pauseApp() {}

    public void destroyApp(boolean unconditional) {}

    public void actionPerformed(ActionEvent ae) {
      notifyDestroyed();
    }
}

run it simple .......