JFrame « JTextArea « Java Swing Q&A





1. JFrame, JTextArea, JOptionPain, JApplet? Clarification?    coderanch.com

import java.awt.*; import java.awt.event.*; import java.awt.geom.*; import javax.swing.*; public class DrawingALine { public static void main(String[] args) { final JFrame f = new JFrame(); JButton open = new JButton("open"); open.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { JOptionPane.showMessageDialog(f, "This is a JOptionPane"); } }); JPanel north = new JPanel(); north.add(open); JTextArea ta = new JTextArea(2,8); JPanel south = new JPanel(); south.add(ta); ...