• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

applet image problem

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello. my purpose is to add a applet into a jframe. i was able to do this for an applet that has JSWING stuff, but i m not able to display in a frame an applet that s drawing an image or any other stuff.
please help me
the applet code is very simple just paint method is overriden and only draw s something. thank you
 
Ranch Hand
Posts: 495
Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
http://download.oracle.com/javase/1.4.2/docs/api/java/awt/Graphics.html

Possible Methods:

drawImage(Image img, int x, int y, Color bgcolor, ImageObserver observer)
drawImage(Image img, int x, int y, ImageObserver observer)
drawImage(Image img, int x, int y, int width, int height, Color bgcolor, ImageObserver observer)
drawImage(Image img, int x, int y, int width, int height, ImageObserver observer)
drawImage(Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, Color bgcolor, ImageObserver observer)
drawImage(Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, ImageObserver observer)

How hard is it?

You could also use something like on JTextPanes:


http://download.oracle.com/javase/6/docs/api/javax/swing/JTextPane.html

cc11rocks aka John Price
 
Octavian Miu
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
you dont understan. i want to insert a image into an applet(i ve done that) and i want to insert that applet into a jframe. if i ran the applet as standalone i was able to see the image, all worked fine, but when i added it into a jframe's container i wasnt able to seee the applet anymore. thats my big problem
 
Sheriff
Posts: 22821
132
Eclipse IDE Spring Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How about you show us an SSCCE (click on the word if you don't know what it means) that displays the problem.
 
reply
    Bookmark Topic Watch Topic
  • New Topic