Inserting image in gui

image in gui

Page 1 of 1

1 Replies - 1339 Views - Last Post: 30 September 2010 - 04:42 PM Rate Topic: -----

#1 minus-a  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 23-January 10

Inserting image in gui

Posted 30 September 2010 - 11:50 AM

Hello, i'm new in java coding. I want to ask question about inserting image into gui. How would the coding be look like?

can anyone show me a simple coding that can run?
Is This A Good Question/Topic? 0
  • +

Replies To: Inserting image in gui

#2 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8378
  • View blog
  • Posts: 31,956
  • Joined: 06-March 08

Re: Inserting image in gui

Posted 30 September 2010 - 04:42 PM

ImageIcon icon = new ImageIcon("xyz.jpg");
JLabel label = new JLabel(icon);

[rules][/rules]
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1