File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes Java GUI Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Java GUI" Watch "Java GUI" New topic
Author

Java GUI

jianfeng
Greenhorn

Joined: Aug 14, 2004
Posts: 3
Hi, I just started learning java not too long ago. Now I am trying to get familiar with the GUI. I tried writing some codes for MasterMind game. But I need help in displaying the images.

Because I cant attatched any files here, please download it from http://nacz.net/mm.zip

I wish to know how do I draw a circle on the board, and how to display a image on the board.

Thanks in advance!
Shashank Agarwal
Ranch Hand

Joined: May 20, 2004
Posts: 105
Code to draw a circle -

Here, the first two arguments indicate the X & Y co-ordinate, whereas, the last two indicate the width and height respectively.

Code to draw an image -

here 5 and 5 indicate the X and Y Co ordinate respectively.
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9047
    
  10
Welcome to JavaRanch, Bre@dpiG.

Please adjust your display name to meet the JavaRanch Naming Policy.
You can change it here.

Thanks!


JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
Moving this to the Swing / JFC / AWT forum...


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
jianfeng
Greenhorn

Joined: Aug 14, 2004
Posts: 3
how do i change my name? i can only change display name in my profile...

yah i tried to use drawoval etc but cant work. not sure why.

i have a container. the container has 2 panels. panel A is for some jlabel to display images of a mastermind board. pabel B is to display some color seeds. i want to draw some circles or display the seeds images to represent seeds on panel A but cant. how do i do it?
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Originally posted by Bre@dpiG:
how do i change my name? i can only change display name in my profile...


Your display name is what needs to be changed.


GenRocket - Experts at Building Test Data
jianfeng
Greenhorn

Joined: Aug 14, 2004
Posts: 3
name changed.

anyone can help me with the gui?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Java GUI