Hi guys im stuck. i need to make a java applet but within a jframe, I've pretty much got it working without a jframe but i can't figure out how to add it in.
Heres my code.
So yeah if you could explain what im suppose to do, it will be much appreciated.import javax.swing.*; import java.awt.*; import java.applet.*; import java.awt.event.*; import java.util.Arrays; import javax.swing.JFrame; public class Gui extends Applet { Button okButton; Button clearButton; JTextField usernameField; JPasswordField passwordField; public void init() { setLayout(null); okButton = new Button("Submit"); clearButton = new Button("Reset"); usernameField = new JTextField("",100); passwordField = new JPasswordField("",100); clearButton.setBounds(160,80,100,30); okButton.setBounds(50,80,100,30); usernameField.setBounds(110,9,200,20); passwordField.setBounds(110,39,200,20); add(clearButton); add(okButton); add(usernameField); add(passwordField); } public void paint(Graphics g) { g.setColor(Color.BLACK); g.drawString("Enter Username:",10,20); g.drawString("Enter Password:",10,55); } }