Embed a painting into a html web page

Embed a painting into a html web page I have designed a 2D GUI interface that has many shapes.How can I embed it into a html web page or jsp?I have no idea about it.Thanks
[206 byte] By [ardmorea] at [2007-11-27 8:40:49]
# 1

> Embed a painting into a html web page

>

> I have designed a 2D GUI interface that has many

> shapes.

> How can I embed it into a html web page or jsp?

> I have no idea about it.

>

> Thanks

Is this an image? An applet? A swing app? What exactly is it? With what was it made?

Navy_Codera at 2007-7-12 20:39:27 > top of Java-index,Java Essentials,Java Programming...
# 2
a frame.
ardmorea at 2007-7-12 20:39:27 > top of Java-index,Java Essentials,Java Programming...
# 3
this frame contains many components such as lines and circles.
ardmorea at 2007-7-12 20:39:27 > top of Java-index,Java Essentials,Java Programming...
# 4
> a frame.As in java.awt.Frame, javax.swing.JFrame or an HTML frame?
Navy_Codera at 2007-7-12 20:39:27 > top of Java-index,Java Essentials,Java Programming...
# 5
If it's either a java.awt.Frame or javax.swing.JFrame, then place it in an Applet or JApplet (respectively) and embed that into the page.
Navy_Codera at 2007-7-12 20:39:27 > top of Java-index,Java Essentials,Java Programming...
# 6
java.awt.Frame.then put the fram in a HTML web page.I have no idea of it.
ardmorea at 2007-7-12 20:39:27 > top of Java-index,Java Essentials,Java Programming...
# 7

A demo:

import java.awt.*;

import java.applet.Applet;

class TFrame extends Frame {

private Button button;

public TFrame() {

button = new Button("Test");

button.setSize(100, 20);

button.setLocation(5, 5);

this.add(button);

this.setSize(300, 300);

}

}

public class FrameTest extends Applet {

public void init() {

TFrame t = new TFrame();

this.add(t);

this.setSize(300, 300);

}

}

And the HTML file:

<html>

<body>

<applet code="FrameTest.class" width=300 height=300></applet>

</body>

</html>

Navy_Codera at 2007-7-12 20:39:27 > top of Java-index,Java Essentials,Java Programming...
# 8
Thank you so much!I always get people's warmly help.Best Regards!
ardmorea at 2007-7-12 20:39:27 > top of Java-index,Java Essentials,Java Programming...
# 9
> Thank you so much!> I always get people's warmly help.> > Best Regards!I'm glad I could help :-)
Navy_Codera at 2007-7-12 20:39:27 > top of Java-index,Java Essentials,Java Programming...
# 10
If TFrame involes File I/O, Is still ok for this secenerio?
ardmorea at 2007-7-12 20:39:27 > top of Java-index,Java Essentials,Java Programming...
# 11
> If TFrame involes File I/O, Is still ok for this> secenerio?Applets have to be signed in order to access the client's filesystem. They can request files from the server though. http://www.duckware.com/applets/reference.html#securitymodel
hunter9000a at 2007-7-12 20:39:27 > top of Java-index,Java Essentials,Java Programming...
# 12
> TFrame t = new TFrame();> this.add(t);I don't think you can do that -- add a window to a container.
BigDaddyLoveHandlesa at 2007-7-12 20:39:27 > top of Java-index,Java Essentials,Java Programming...
# 13
> > TFrame t = new TFrame();> > this.add(t);> > I don't think you can do that -- add a window to a> container.If he makes TFrame extend Panel instead of Frame, then it can be added to either an applet or a frame. Hooray code reuse!
hunter9000a at 2007-7-12 20:39:27 > top of Java-index,Java Essentials,Java Programming...