Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Other Java > Java GUI
|
Java GUI Discussions specific to programming Java GUI.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Java GUI section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 5th, 2005, 06:53 AM
Registered User
 
Join Date: Jul 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to sleepmonster
Default Image or ImageIcon?

Hello people. I am trying to write a GUI to model a hand of poker. So far i am writing a class that extends canvas, is that the correct way to go about it? When i want to display my images of cards i'm getting confused between the image class in the awt package and the imageicon class in the swing package, as a result i'm getting confused and frustrated. Can anyone offer me any advice? anything at all would be much appreciated. Thankyou.
 
Old August 1st, 2005, 06:33 PM
Authorized User
 
Join Date: Aug 2005
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,
If you are handling the drawing of Images by yourself using Graphics, which I think you will. I suggest you to use Image instead of ImageIcon, since Graphics supports drawing of Image. OffCourse you can get a Image object out of ImageIcon object.

Refer, to some image related examples at http://www.javareference.com/jrexamp....jsp?rootcat=2

Rahul


 
Old September 1st, 2005, 06:11 PM
Authorized User
 
Join Date: Jul 2003
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to merediths
Default

BufferedImage is actually probably what you want to look at -- it's a subclass of Image. AFAIR Image is actually an abstract class ... but my memory is a little fuzzy on that point.
 BufferedImage represnts a 2D raster image.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Upload image-create & save thumbnail-display image angshujit ASP.NET 2.0 Professional 6 July 11th, 2013 10:34 PM
Copy kodak image edit control's image to clipboard vishwanathduddilla Visual Studio 2005 0 November 3rd, 2008 10:10 AM
set image on <asp:Image> stored in DataBase myself.panku ASP.NET 2.0 Professional 1 August 11th, 2008 10:41 AM
Document Image Processing (DIP) - changing image f ALcom Access 0 March 27th, 2006 06:10 AM
displaying an image from file stream into an image sanjeet ADO.NET 0 September 23rd, 2005 10:28 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.