Results 1 to 3 of 3

Thread: JLabel

  1. #1
    Jack is offline Senior Member
    Join Date
    Jun 2007
    Posts
    130
    Rep Power
    0

    Default JLabel

    Hi guys, I have a silly question:
    When I do:
    Java Code:
    JLabel label= new JLabel("Hi", new ImageIcon("image.jpg"));
    appears:

    [image.jpg] Hi

    How can I do that?

    Hi [image.jpg];
    thnx
    Last edited by Jack; 06-30-2007 at 02:39 AM.

  2. #2
    bbq
    bbq is offline Senior Member
    Join Date
    Jun 2007
    Posts
    132
    Rep Power
    0

    Default

    Did you try
    Java Code:
    JLabel label= new JLabel(new ImageIcon("image.jpg"),"Hi");
    ??
    it's ridiculous but maybe it works

  3. #3
    Peter is offline Senior Member
    Join Date
    Jun 2007
    Posts
    119
    Rep Power
    0

    Default

    Have you use jigloo?Cloud Garden - Jigloo GUI Builder (SWT and Swing) for Eclipse
    This is a free plugin that allows to drag and drop components without programming them.
    Also each component have their properties and you can do a jlabel and it's easy to put an image inside it with this tool.
    try it.

Similar Threads

  1. JLabel append?
    By Jononomous in forum New To Java
    Replies: 0
    Last Post: 04-07-2008, 08:41 PM
  2. JLabel .setActionCommand
    By stevemcc in forum AWT / Swing
    Replies: 1
    Last Post: 03-28-2008, 05:16 AM
  3. Problems with JLabel 2
    By geork in forum New To Java
    Replies: 2
    Last Post: 02-03-2008, 09:40 PM
  4. help me with JFrame and JLabel
    By michcio in forum New To Java
    Replies: 5
    Last Post: 11-20-2007, 08:44 AM
  5. JLabel
    By Freddie in forum AWT / Swing
    Replies: 2
    Last Post: 05-29-2007, 03:19 PM

Posting Permissions

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