All pastes #131540 Raw Edit

aa

public text v1 · immutable
#131540 ·published 2006-08-14 15:36 UTC
rendered paste body
import javax.swing.*;
import java.util.*;

public class Hi {
    public Hi() {
        JTextArea text = new JTextArea("I luv \n it \n!No Kidding!!",4,1);
        JTextArea text2 = new JTextArea("");
        String CheckText = text.getText();
        String[] data = {"one", "two", "three", "four"};
        JList dataList = new JList(data);
        JCheckBox cb = new JCheckBox("Show this in the future");
        cb.setSelected(true);
        Object [] msg = {"Blah Blah", cb,dataList,text,text2};
        JOptionPane.showMessageDialog(null,msg,"Trial",JOptionPane.PLAIN_MESSAGE);
        boolean show = cb.isSelected();
        
        if(!CheckText.equals(text.getText()))
            text2.setText(text.getText());
        JOptionPane.showMessageDialog(null,msg,"Trial",JOptionPane.PLAIN_MESSAGE);
        
        
    }

    public static void main(String[] args) {
        Hi hi = new Hi();
    }
}