×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Nov 2007
    Posts
    12

    Exclamation How to use J2ME polish code in existing J2ME app.

    Dear All,

    I've added j2me polish with NetBeans 6.1 successfully in my existing j2me project, but now i dont know how to use/include polish code in my application. i saw different ways. but cant use that. if i want to use polish using CSS with any existing J2ME project then what need to be done ? anyone can help me ???

    if possible then tell me the steps with a demo source code.
    i'm using >>
    1. NetBeans 6.1
    2. Polish 2.0.4

  2. #2
    Super Contributor
    Join Date
    Apr 2007
    Posts
    2,708

    Re: How to use J2ME polish code in existing J2ME app.

    what have u tried so far ? u are mentioning "different ways" ?
    afaik u can include the build.xml file from one of the example applications and overwrite ur own. Or create a new Polish project after a succesfull installation (which I personally never achieved)...

  3. #3
    Registered User
    Join Date
    Nov 2007
    Posts
    12

    Re: How to use J2ME polish code in existing J2ME app.

    I just want a guidline on how i can use J2ME Polish in my existing J2ME application. I installed and add "enough-j2mepolish-client.jar" to my existing application, project configuration is >>
    1. CLDC 1.1
    2. MIDP 2.0
    3. Emulator: Sun Java WTK 2.5.2
    say i've existing code of creating image, now i want to apply polish to add image border on that image. i tried the following codes for polish:-

    //importing polish for Image Border
    import de.enough.polish.ui.borders.ImageBorder;

    //my polish function
    //test polish with image
    public void polishImg(){
    menuFrm = new Form("Please choose an image");
    try{
    //javax Image class
    Image m_1 = Image.createImage("/1.gif");
    Image m_2 = Image.createImage("/2.gif");
    //polish ImageBorder class
    ImageBorder imgb = new ImageBorder(m_1.getWidth(),"/1.gif");
    imgb.borderWidth = 2;
    //imgb.paint(0, 0, m_1.getWidth(), m_1.getHeight(), m_1.getGraphics());
    //javax ImageItem
    ImageItem itm_1 = new ImageItem(null,m_1,ImageItem.LAYOUT_NEWLINE_BEFORE,"1");
    ImageItem itm_2 = new ImageItem(null,m_2,ImageItem.LAYOUT_NEWLINE_BEFORE,"2");
    //javax Form
    menuFrm.append(itm_1);
    menuFrm.append(itm_2);

    menuFrm.addCommand(exitCommand);
    menuFrm.setCommandListener(this);
    display.setCurrent(menuFrm);

    }
    catch(Exception ex){ex.printStackTrace();}

    }

    ***** But its now showing any border over the images, i didnt apply any extra configuration for using Polish.

    so is there anyone who can tell me about this solution ??

Similar Threads

  1. J2ME Polish
    By jig22nesh in forum Mobile Java General
    Replies: 6
    Last Post: 2009-02-06, 09:07
  2. Changing App Mgr settings from J2ME app
    By ddbhasin in forum Mobile Java General
    Replies: 6
    Last Post: 2007-09-21, 07:18
  3. problems displaying video
    By gorsken in forum Mobile Java Media (Graphics & Sounds)
    Replies: 6
    Last Post: 2006-06-21, 17:18
  4. upload J2ME app onto Java phones
    By mzichao in forum Mobile Java General
    Replies: 1
    Last Post: 2005-01-11, 07:11
  5. J2ME Polish 0.9.2 released: a next generation build tool
    By enough in forum Mobile Java General
    Replies: 15
    Last Post: 2004-06-18, 06:44

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×