This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's Calculator Programming subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.

This forum is locked: you cannot post, reply to, or edit topics. General Coding and Design => Calculator Programming
Author Message
elfprince13
Retired


Super Elite (Last Title)


Joined: 11 Apr 2005
Posts: 3500

Posted: 03 Oct 2005 12:17:51 pm    Post subject:

Hey, does anyone know how to read a gif/jpg/png image from a Java application. I have a book that explains how to do it with an applet, but I dont want to use an applet. I want it for an application, because applets can't save stuff to the client computer, and applications can be downloaded and can actually save stuff

Last edited by Guest on 03 Oct 2005 12:18:02 pm; edited 1 time in total
Back to top
JoeImp
Enlightened


Active Member


Joined: 24 May 2003
Posts: 747

Posted: 03 Oct 2005 02:27:35 pm    Post subject:

http://schmidt.devlib.org/java/image-faq/index.html

Google
Back to top
elfprince13
Retired


Super Elite (Last Title)


Joined: 11 Apr 2005
Posts: 3500

Posted: 03 Oct 2005 05:51:59 pm    Post subject:

I spent a while on Google, Everyone does tutorials for Applets which is really annoying for serious game programmers
Back to top
Arcane Wizard
`semi-hippie`


Super Elite (Last Title)


Joined: 02 Jun 2003
Posts: 8993

Posted: 04 Oct 2005 09:35:32 am    Post subject:

Who should know that Applications can use the same classes and methods.
Back to top
elfprince13
Retired


Super Elite (Last Title)


Joined: 11 Apr 2005
Posts: 3500

Posted: 04 Oct 2005 10:43:52 am    Post subject:

I guess since an Applet it is a container I could add it to frame and call init(). Im using a ScrollPane for my map though, so I'd have to add it to the Applet and then add the Applet to the Frame. ah, the joys of oop programming.

anyway I dont think you can use the AppletContext methods in an Application.
Back to top
Arcane Wizard
`semi-hippie`


Super Elite (Last Title)


Joined: 02 Jun 2003
Posts: 8993

Posted: 04 Oct 2005 10:56:23 am    Post subject:

I've always used the exact same code with images in Applets and Applications alike.

And JFrame also inherits from container.
Back to top
elfprince13
Retired


Super Elite (Last Title)


Joined: 11 Apr 2005
Posts: 3500

Posted: 04 Oct 2005 12:15:46 pm    Post subject:

The book I have never explained creating a new Toolkit and using it's methods. It always said to use Applet's getImage() method or Components createImage() method for Applications. However Component's method doesn't allow a String filename argument

Last edited by Guest on 04 Oct 2005 12:15:59 pm; edited 1 time in total
Back to top
Arcane Wizard
`semi-hippie`


Super Elite (Last Title)


Joined: 02 Jun 2003
Posts: 8993

Posted: 04 Oct 2005 01:15:49 pm    Post subject:

It does actually.

[url="http://java.sun.com/j2se/1.4.2/docs/api/java/awt/Toolkit.html#createImage(java.lang.String)"]http://java.sun.com/j2se/1.4.2/docs/api/ja...va.lang.String)[/url]
Back to top
elfprince13
Retired


Super Elite (Last Title)


Joined: 11 Apr 2005
Posts: 3500

Posted: 04 Oct 2005 01:37:08 pm    Post subject:

look under the API entry for [url="http://java.sun.com/j2se/1.4.2/docs/api/java/awt/Component.html#createImage(java.awt.image.ImageProducer)"]Component.createImage()[/url].


no way to specify a file to read from. The only one of my 5 Java textbooks that explained anything about images whatsoever is mostly for Applets, so it didn't mention toolkit. it mentioned [url="http://java.sun.com/j2se/1.4.2/docs/api/java/awt/Component.html#createImage(java.awt.image.ImageProducer)"]Component.createImage()[/url], and [url="http://java.sun.com/j2se/1.4.2/docs/api/java/applet/Applet.html#getImage(java.net.URL)"]Applet.getImage()[/url].


Last edited by Guest on 04 Oct 2005 01:53:38 pm; edited 1 time in total
Back to top
Display posts from previous:   
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
    »
» View previous topic :: View next topic  
Page 1 of 1 » All times are UTC - 5 Hours

 

Advertisement