Mega Code Archive

 
Categories / Java / Swing JFC
 

A simple drop tester application for JDK 1 4 Swing components

import java.awt.BorderLayout; import java.awt.Color; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JTextArea; public class DropTest14 extends JFrame {   JTextArea ta;   public DropTest14() {     super("Drop Test 1.4");     setSize(300, 300);     setDefaultCloseOperation(EXIT_ON_CLOSE);     getContentPane().add(         new JLabel("Drop the choice from your JList here:"),         BorderLayout.NORTH);     ta = new JTextArea();     ta.setBackground(Color.white);     getContentPane().add(ta, BorderLayout.CENTER);     setVisible(true);   }   public static void main(String args[]) {     new DropTest14();   } }