Lecture 21 | Programming Methodology (Stanford)
Top Comments
All Comments (26)
-
Sure is
-
This is Java language right??
-
where could we find this book of yours?
name and author at least
-
@ishengoma5 thanx a lot bro....it was very helpful thanx
can u plz refer some material for learning the graphical user interface part.......
-
@anshul20081 /*
import java.awt.*;
import java.awt.event.*;
import acm.program.*;
import javax.swing.*;
public class TextFieldExample extends ConsoleProgram { Container Panel; public void init() {
setFont("Courier-24"); tf = new JTextField(10); Panel = getContentPane(); Panel.add(new JLabel("Name")); add(new JLabel("Name"), SOUTH); Panel.add(tf); add(tf, SOUTH);
tf.addActionListener(this); } same actionPerformed method here }
-
@ishengoma5 still not wprking bro can you paste the code plz
dont know where i am stuck think there is something wrong with the java packages.....
-
First include "import java.awt.Container;" with the other imports. After the class (before the init method) put this statement "Container Panel;". Inside the init method add the statements "Panel = getContentPane(); Panel.add(tf);". That's it!



Very good lecture
I learn a lot of it..
weleio 2 years ago 13
excellent
SanaNidhi18 2 years ago 9