Please tell why I always getting the same size of the applet?
In my Netbeans 8.1, <applet? Tag is not changing the size of the applet , just showing in the same standard size?
What should I do?
This is my code:
package online.book.store;
import java.awt.*;
import java.awt.event.*;
import java.applet.*;
/*
<applet code="Home_Page" width=300 height=800> </applet>
*/
class SampleFrame extends Frame { SampleFrame(String title) {
super(title);
MyWindowAdapter adapter = new MyWindowAdapter(this);
addWindowListener(adapter);
}
public void paint(Graphics g) {
g.drawString("This is in frame window", 50, 90);
}
}
class MyWindowAdapter extends WindowAdapter { SampleFrame sampleFrame;
public MyWindowAdapter(SampleFrame sampleFrame) { this.sampleFrame = sampleFrame;
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…