-3

I'm new at java.

I would like to do a project in Eclipse which consists of a table (with the JTable) with 10 columns and seven rows. And in every cell of this table make a JLabel where I'll put an image.

I've searched the Internet and I've been able to charge some images and little more.

Could you help me with something?

Amarnath
  • 8,736
  • 10
  • 54
  • 81
  • 4
    Be specific where do you need help, and show us some code that you tried so far. – Smit Dec 18 '12 at 01:19
  • Not really an answer, but if you're really really new to Java and GUI programming (in Java), download the netbeans IDE (if you are not already using it). Then do two things: 1) Implement this using their drag and drop designer. AND (VERY importantly) 2) Study the generated code, perhaps copy it in such a way you can edit it easily, and play with it. Remove lines, add lines in, etc... Doing this is a pretty easy way to learn the GUI mechanisms in java. – David D Dec 18 '12 at 01:24
  • 5
    See also [*How to Use Tables*](http://docs.oracle.com/javase/tutorial/uiswing/components/table.html) and [examples](http://docs.oracle.com/javase/tutorial/uiswing/components/table.html#eg). – trashgod Dec 18 '12 at 01:29
  • 1
    Also consider a `JList`, illustrated [here](http://stackoverflow.com/a/13754697/230513). – trashgod Dec 18 '12 at 01:41

1 Answers1

3

First of all welcome to SO. Before attempting to solve your problem you need to learn about,

After going through the above topics and examples you will be able to solve your issue i.e,

..every box of this table make a JLabel where I'll put an image.

There were many posts (one of the example by camickr) avaialable on SO for how to render an image in a JTable cell. Please go through them.

Community
  • 1
  • 1
Amarnath
  • 8,736
  • 10
  • 54
  • 81