Click here to Skip to main content
15,897,718 members
Home / Discussions / Java
   

Java

 
Answerdouble post Pin
TorstenH.17-Aug-12 9:00
TorstenH.17-Aug-12 9:00 
Generalproblem while updating a text file in java Pin
Namdeo Badhe17-Aug-12 6:45
Namdeo Badhe17-Aug-12 6:45 
GeneralRe: problem while updating a text file in java Pin
Richard MacCutchan17-Aug-12 6:59
mveRichard MacCutchan17-Aug-12 6:59 
QuestionMessage Removed Pin
16-Aug-12 6:53
Member 936232116-Aug-12 6:53 
QuestionSwing Pin
Joshua Waring15-Aug-12 23:53
Joshua Waring15-Aug-12 23:53 
AnswerRe: Swing Pin
pasztorpisti16-Aug-12 0:28
pasztorpisti16-Aug-12 0:28 
GeneralRe: Swing Pin
Joshua Waring16-Aug-12 0:45
Joshua Waring16-Aug-12 0:45 
AnswerRe: Swing Pin
pasztorpisti16-Aug-12 0:55
pasztorpisti16-Aug-12 0:55 
There you go. This time I compiled/tested it, contained another big mistake. Why have you used those stacks? You should check the error messages as well in the console output!!! You program threw exceptions!

Java
import java.awt.Button;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Stack;
 
import javax.swing.*;
public class GUI extends JFrame implements ActionListener{
	JTextField input;
	JTextArea output;
	Button button;
	public GUI(){
		
		setTitle("Satire v1.0.1");
		setSize(320,360);
		setLocationRelativeTo(null);
		setDefaultCloseOperation(EXIT_ON_CLOSE);
		
		JPanel panel = new JPanel();
		panel.setLayout(null);
		
		output = new JTextArea();
		output.setBounds(0, 0, 300, 300);
		output.setEditable(false);
		
		input = new JTextField();
		input.setBounds(0, 300, 260, 20);
		
		button = new Button("SEND");
		button.setBounds(250, 300, 50, 20);
		button.addActionListener(this);
		
		getContentPane().add(panel);
		panel.add(button);
		panel.add(input);
		panel.add(output);
	}
	public void actionPerformed(ActionEvent e) { 
		try{
			String out = input.getText();
			output.append(input.getText());
			input.selectAll();
			input.requestFocusInWindow();
		}catch(NullPointerException e3){}
	}
	
	public static void main(String[] args){
		 SwingUtilities.invokeLater(new Runnable() {
			 public void run(){
				 GUI cGUI = new GUI();
				 cGUI.setVisible(true);
			 }
		 });
	}
}

GeneralRe: Swing Pin
Joshua Waring16-Aug-12 1:22
Joshua Waring16-Aug-12 1:22 
GeneralRe: Swing Pin
pasztorpisti16-Aug-12 1:50
pasztorpisti16-Aug-12 1:50 
GeneralRe: Swing Pin
Joshua Waring16-Aug-12 2:02
Joshua Waring16-Aug-12 2:02 
GeneralRe: Swing Pin
pasztorpisti16-Aug-12 2:12
pasztorpisti16-Aug-12 2:12 
GeneralRe: Swing Pin
Joshua Waring16-Aug-12 3:57
Joshua Waring16-Aug-12 3:57 
GeneralRe: Swing Pin
pasztorpisti16-Aug-12 4:08
pasztorpisti16-Aug-12 4:08 
GeneralRe: Swing Pin
Joshua Waring16-Aug-12 4:11
Joshua Waring16-Aug-12 4:11 
SuggestionRe: Swing Pin
pasztorpisti16-Aug-12 4:24
pasztorpisti16-Aug-12 4:24 
GeneralRe: Swing Pin
Joshua Waring16-Aug-12 2:13
Joshua Waring16-Aug-12 2:13 
SuggestionRe: Swing Pin
pasztorpisti16-Aug-12 1:00
pasztorpisti16-Aug-12 1:00 
AnswerRe: Swing Pin
Gowtham Gutha15-Nov-12 7:31
Gowtham Gutha15-Nov-12 7:31 
QuestionMutual SSL Setup Pin
balarayala12-Aug-12 23:16
balarayala12-Aug-12 23:16 
AnswerRe: Mutual SSL Setup Pin
Richard MacCutchan13-Aug-12 0:42
mveRichard MacCutchan13-Aug-12 0:42 
GeneralRe: Mutual SSL Setup Pin
balarayala13-Aug-12 16:32
balarayala13-Aug-12 16:32 
GeneralRe: Mutual SSL Setup Pin
Richard MacCutchan13-Aug-12 21:24
mveRichard MacCutchan13-Aug-12 21:24 
GeneralRe: Mutual SSL Setup Pin
Richard MacCutchan13-Aug-12 23:02
mveRichard MacCutchan13-Aug-12 23:02 
GeneralRe: Mutual SSL Setup Pin
Paul Conrad13-Aug-12 23:44
professionalPaul Conrad13-Aug-12 23:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.