Welcome to SPARC Forums. Please login or sign up.

Dec 22, 2024, 09:30:45 AM

Login with username, password and session length

I know we have several computer...

Started by lucky, Nov 29, 2003, 08:57:42 AM

Previous topic - Next topic

lucky

gurus out there.  I'm working on my 2nd AAS degree hoping that a job will appear in the computer programming field that I am qualified and able to take.

In any case, I'm working on Java and it's driving me nuts!!!  One assignment left and I'm done but I'm stuck!

Problem:  Have "Friend class" that contains name, address, phone, bdate and name of picture file.  So far, so good -- it all prints to the window that I originally made using the Window class.  The picture file is a jpg and the problem must be an application, not an HACK.

I have to display the picture though, not the filename.  And I can't seem to make it do everything.  Any pointers on what to use for a container -- it won't let me use the getImage method either even when I import everything and use a class extending Frame.  I don't want to be told how to do it, but just to be pointed in the right direction so I can figure it out.

I'm using j2sdk1.4.0 if that helps, I have no experience with javax.swing (which is all I can find answers about at Sun's website), etc.  REALLY BASIC stuff so far.

If I don't get it done today, I'm giving up but I could blow my (so far) perfect GPA cause it's worth about 4% of my grade and, as I said, it's been driving me nuts -- all semester, 4% would drop my grade far too much.

Thanks!
Lucky

Lead your life so you wouldn't be ashamed to sell the family parrot to the town gossip. ~  Will Rogers

FatherTime

[a href=http://beta.experts-exchange.com/Programming/Programming_Languages/Java/Q_20699665.html]Try here?[/a]

[a href=http://java.sun.com/j2se/1.4.2/docs/api/java/awt/Image.html]and here...[/a]

[a href=http://java.sun.com/j2se/1.4.2/docs/index.html]I think that you have already been here...but just in case[/a]

I think what you want to do is PRINT the picture.  (not to a printer, but to the screen)


I'll check back in about an hour to see if you are online.

lucky

Thanks FT!  The 2nd one I've visited OVER AND OVER checking out different things and haven't found anything to help yet -- usually that's where I find my answers too so I'm kind of stuck.

The 1st and 3rd I haven't visited before and after church, I intend to check them out.  I'll make sure to log in just in case you happen to be online.

I'm too much of a perfectionist when it comes to this stuff to just give up already with the problem not due till Wednesday evening.  :)  I don't like it frustrating me, I HAVE to know the answer, lol.
Lucky

Lead your life so you wouldn't be ashamed to sell the family parrot to the town gossip. ~  Will Rogers

FatherTime


lucky

Didn't get the picture to show.  My teacher told me that I have to use Frame.  I did, but couldn't get it to work.

On the plus side, we reviewed my grades and as long as I do well on the final project, my grade will be okay.

The final project is an HACK that is "fancy" and somewhat complex with images, graphics, color and sound.  I get to design it from scratch as long as it contains the required components.  

I like HACKs!  :)

Anyway, thank you for your help, FT.  You gave me some links that I can use for future reference.
Lucky

Lead your life so you wouldn't be ashamed to sell the family parrot to the town gossip. ~  Will Rogers

doood

took a (teeny) little c++ in college... but i spent hours on some number theory and calculus problems.  VERY satisfying to plug all the way through.