import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
import java.text.DateFormat;
import java.util.GregorianCalendar;
import javax.swing.GroupLayout;
import javax.swing.JComponent;
import javax.swing.JTextPane;
import javax.swing.WindowConstants;
import javax.swing.SwingUtilities;
import javax.swing.text.BadLocationException;
/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit [url=http://www.cloudgarden.com]Cloud Garden (Java Resources)[/url] for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class Beispiel extends javax.swing.JFrame {
private JTextPane receive;
private JTextPane send_txt;
/**
* Auto-generated main method to display this JFrame
*/
public static void main(String[] args) {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
Beispiel inst = new Beispiel();
inst.setLocationRelativeTo(null);
inst.setVisible(true);
}
});
}
public Beispiel() {
super();
initGUI();
}
private void initGUI() {
try {
GroupLayout thisLayout = new GroupLayout((JComponent)getContentPane());
getContentPane().setLayout(thisLayout);
setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
{
receive = new JTextPane();
receive.setEditable(false);
}
{
send_txt = new JTextPane();
send_txt.addKeyListener(new KeyAdapter() {
public void keyPressed(KeyEvent evt) {
send_txtKeyPressed(evt);
}
});
}
thisLayout.setVerticalGroup(thisLayout.createSequentialGroup()
.addContainerGap(18, 18)
.addComponent(receive, GroupLayout.PREFERRED_SIZE, 146, GroupLayout.PREFERRED_SIZE)
.addGap(17)
.addComponent(send_txt, GroupLayout.PREFERRED_SIZE, 148, GroupLayout.PREFERRED_SIZE)
.addContainerGap(27, Short.MAX_VALUE));
thisLayout.setHorizontalGroup(thisLayout.createSequentialGroup()
.addContainerGap(18, 18)
.addGroup(thisLayout.createParallelGroup()
.addGroup(thisLayout.createSequentialGroup()
.addComponent(receive, GroupLayout.PREFERRED_SIZE, 328, GroupLayout.PREFERRED_SIZE)
.addGap(0, 0, Short.MAX_VALUE))
.addGroup(GroupLayout.Alignment.LEADING, thisLayout.createSequentialGroup()
.addGap(0, 0, Short.MAX_VALUE)
.addComponent(send_txt, GroupLayout.PREFERRED_SIZE, 328, GroupLayout.PREFERRED_SIZE)))
.addContainerGap());
pack();
} catch (Exception e) {
e.printStackTrace();
}
}