appletviewer

How to set size of applet?

烂漫一生 提交于 2019-12-02 06:56:02
问题 I have written a little test applet and start the applet via Eclipse appletviewer. I have noted tag at the begginig of the code, but appletviewer doesn't see it. It starts the applet in standart window with the same size every time. I use JDK 1.7, Eclipse Kepler import java.awt.Container; import java.awt.Dimension; import java.awt.FlowLayout; import java.awt.GridLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JApplet; import javax.swing

How to set size of applet?

这一生的挚爱 提交于 2019-12-02 04:57:47
I have written a little test applet and start the applet via Eclipse appletviewer. I have noted tag at the begginig of the code, but appletviewer doesn't see it. It starts the applet in standart window with the same size every time. I use JDK 1.7, Eclipse Kepler import java.awt.Container; import java.awt.Dimension; import java.awt.FlowLayout; import java.awt.GridLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JApplet; import javax.swing.JButton; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JTextField; /*<applet

Java applet does not display anything

喜你入骨 提交于 2019-12-01 17:35:29
问题 Does anyone know why my Java applet does not display anything? This is my first Java applet so I am new to creating one. I researched this problem and haven't found an answer specific to the current problem. import java.applet.Applet; import java.awt.Graphics; import java.awt.Font; import java.awt.Color; public class JavaRocksApplet extends Applet { public void paint( Graphics screen ) { Font f = new Font( "TimesRoman", Font.ITALIC, 36 ); screen.setFont( f ); Color c = new Color( 40, 80, 120