×

Discussion Board

Results 1 to 7 of 7

Threaded View

  1. #1
    Registered User
    Join Date
    May 2013
    Posts
    20

    Using graphic to drawString in more line

    Hi, I am developing my app
    I want to using graphic to draw a String auto down the line when end of screen or display in exactly line i need ( such text wrap on in list)
    I have a class such:
    class TouchItem extends CustomItem
    {
    ....
    ....

    public TouchItem( String label, int itemsHeight, Main midlet)
    {
    ...
    ...
    }

    public void paint(Graphics g, int width, int height) {


    g.setColor(midlet.getForegroundColor());
    //g.drawRect(0, 0, width-2, height-2);
    g.drawString(label,(g.getFont().getSize()),
    (height - g.getFont().getHeight())/2, g.LEFT|g.TOP); //draw here


    }
    who anybody help me?
    Last edited by tieubinh; 2013-05-15 at 14:41.

Similar Threads

  1. drawString() is defferent?
    By Vitaly_iva in forum Mobile Java General
    Replies: 0
    Last Post: 2008-02-15, 19:59
  2. listbox with small graphic vs. listbox with large graphic
    By huami in forum Symbian User Interface
    Replies: 4
    Last Post: 2007-08-07, 10:57
  3. g.drawString()
    By yafy in forum Mobile Java Tools & SDKs
    Replies: 3
    Last Post: 2006-05-12, 08:55
  4. g.drawString + Double
    By patricksteiner in forum Mobile Java General
    Replies: 4
    Last Post: 2003-03-26, 14:07
  5. DirectGraphics and drawString
    By mugent in forum Mobile Java General
    Replies: 1
    Last Post: 2003-02-17, 12:37

Posting Permissions

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