View zusammengeklickert
This commit is contained in:
parent
502b68915d
commit
521f289564
123
src/chatprogramm/view/ChatView.form
Normal file
123
src/chatprogramm/view/ChatView.form
Normal file
@ -0,0 +1,123 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
|
||||||
|
<Form version="1.9" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo">
|
||||||
|
<NonVisualComponents>
|
||||||
|
<Container class="javax.swing.JDialog" name="jDialogServerClient">
|
||||||
|
|
||||||
|
<Layout>
|
||||||
|
<DimensionLayout dim="0">
|
||||||
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
|
<EmptySpace min="0" pref="400" max="32767" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
</DimensionLayout>
|
||||||
|
<DimensionLayout dim="1">
|
||||||
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
|
<EmptySpace min="0" pref="300" max="32767" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
</DimensionLayout>
|
||||||
|
</Layout>
|
||||||
|
</Container>
|
||||||
|
<Menu class="javax.swing.JMenuBar" name="jMenuBar1">
|
||||||
|
<SubComponents>
|
||||||
|
<Menu class="javax.swing.JMenu" name="jMenu2">
|
||||||
|
<Properties>
|
||||||
|
<Property name="text" type="java.lang.String" value="File"/>
|
||||||
|
</Properties>
|
||||||
|
</Menu>
|
||||||
|
<Menu class="javax.swing.JMenu" name="jMenu3">
|
||||||
|
<Properties>
|
||||||
|
<Property name="text" type="java.lang.String" value="Edit"/>
|
||||||
|
</Properties>
|
||||||
|
</Menu>
|
||||||
|
</SubComponents>
|
||||||
|
</Menu>
|
||||||
|
</NonVisualComponents>
|
||||||
|
<Properties>
|
||||||
|
<Property name="defaultCloseOperation" type="int" value="3"/>
|
||||||
|
</Properties>
|
||||||
|
<SyntheticProperties>
|
||||||
|
<SyntheticProperty name="menuBar" type="java.lang.String" value="jMenuBar1"/>
|
||||||
|
<SyntheticProperty name="formSizePolicy" type="int" value="1"/>
|
||||||
|
<SyntheticProperty name="generateCenter" type="boolean" value="false"/>
|
||||||
|
</SyntheticProperties>
|
||||||
|
<AuxValues>
|
||||||
|
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
|
||||||
|
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
|
||||||
|
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
|
||||||
|
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
|
||||||
|
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
|
||||||
|
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
|
||||||
|
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
|
||||||
|
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
|
||||||
|
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
|
||||||
|
<AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,44,0,0,1,-112"/>
|
||||||
|
</AuxValues>
|
||||||
|
|
||||||
|
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
|
||||||
|
<SubComponents>
|
||||||
|
<Container class="javax.swing.JLayeredPane" name="chatControll">
|
||||||
|
<Constraints>
|
||||||
|
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||||
|
<BorderConstraints direction="Last"/>
|
||||||
|
</Constraint>
|
||||||
|
</Constraints>
|
||||||
|
|
||||||
|
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout"/>
|
||||||
|
<SubComponents>
|
||||||
|
<Component class="javax.swing.JButton" name="btnSend">
|
||||||
|
<Properties>
|
||||||
|
<Property name="text" type="java.lang.String" value="send"/>
|
||||||
|
</Properties>
|
||||||
|
</Component>
|
||||||
|
<Component class="javax.swing.JButton" name="btnClear">
|
||||||
|
<Properties>
|
||||||
|
<Property name="text" type="java.lang.String" value="clear"/>
|
||||||
|
</Properties>
|
||||||
|
</Component>
|
||||||
|
</SubComponents>
|
||||||
|
</Container>
|
||||||
|
<Container class="javax.swing.JLayeredPane" name="chatContent">
|
||||||
|
<Constraints>
|
||||||
|
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||||
|
<BorderConstraints direction="Center"/>
|
||||||
|
</Constraint>
|
||||||
|
</Constraints>
|
||||||
|
|
||||||
|
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBoxLayout">
|
||||||
|
<Property name="axis" type="int" value="3"/>
|
||||||
|
</Layout>
|
||||||
|
<SubComponents>
|
||||||
|
<Container class="javax.swing.JScrollPane" name="jScrollPane1">
|
||||||
|
<AuxValues>
|
||||||
|
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
|
||||||
|
</AuxValues>
|
||||||
|
|
||||||
|
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
|
||||||
|
<SubComponents>
|
||||||
|
<Component class="javax.swing.JTextArea" name="taEmpfangen">
|
||||||
|
<Properties>
|
||||||
|
<Property name="columns" type="int" value="20"/>
|
||||||
|
<Property name="rows" type="int" value="5"/>
|
||||||
|
</Properties>
|
||||||
|
</Component>
|
||||||
|
</SubComponents>
|
||||||
|
</Container>
|
||||||
|
<Container class="javax.swing.JScrollPane" name="jScrollPane2">
|
||||||
|
<AuxValues>
|
||||||
|
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
|
||||||
|
</AuxValues>
|
||||||
|
|
||||||
|
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
|
||||||
|
<SubComponents>
|
||||||
|
<Component class="javax.swing.JTextArea" name="taSenden">
|
||||||
|
<Properties>
|
||||||
|
<Property name="columns" type="int" value="20"/>
|
||||||
|
<Property name="rows" type="int" value="5"/>
|
||||||
|
</Properties>
|
||||||
|
</Component>
|
||||||
|
</SubComponents>
|
||||||
|
</Container>
|
||||||
|
</SubComponents>
|
||||||
|
</Container>
|
||||||
|
</SubComponents>
|
||||||
|
</Form>
|
198
src/chatprogramm/view/ChatView.java
Normal file
198
src/chatprogramm/view/ChatView.java
Normal file
@ -0,0 +1,198 @@
|
|||||||
|
/*
|
||||||
|
* To change this license header, choose License Headers in Project Properties.
|
||||||
|
* To change this template file, choose Tools | Templates
|
||||||
|
* and open the template in the editor.
|
||||||
|
*/
|
||||||
|
package chatprogramm.view;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Gerhard
|
||||||
|
*/
|
||||||
|
public class ChatView extends javax.swing.JFrame
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @return the btnClear
|
||||||
|
*/
|
||||||
|
public javax.swing.JButton getBtnClear()
|
||||||
|
{
|
||||||
|
return btnClear;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the btnSend
|
||||||
|
*/
|
||||||
|
public javax.swing.JButton getBtnSend()
|
||||||
|
{
|
||||||
|
return btnSend;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the jDialogServerClient
|
||||||
|
*/
|
||||||
|
public javax.swing.JDialog getjDialogServerClient()
|
||||||
|
{
|
||||||
|
return jDialogServerClient;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the taEmpfangen
|
||||||
|
*/
|
||||||
|
public javax.swing.JTextArea getTaEmpfangen()
|
||||||
|
{
|
||||||
|
return taEmpfangen;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the taSenden
|
||||||
|
*/
|
||||||
|
public javax.swing.JTextArea getTaSenden()
|
||||||
|
{
|
||||||
|
return taSenden;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates new form ChatView
|
||||||
|
*/
|
||||||
|
public ChatView()
|
||||||
|
{
|
||||||
|
initComponents();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method is called from within the constructor to initialize the form.
|
||||||
|
* WARNING: Do NOT modify this code. The content of this method is always
|
||||||
|
* regenerated by the Form Editor.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
||||||
|
private void initComponents()
|
||||||
|
{
|
||||||
|
|
||||||
|
jDialogServerClient = new javax.swing.JDialog();
|
||||||
|
chatControll = new javax.swing.JLayeredPane();
|
||||||
|
btnSend = new javax.swing.JButton();
|
||||||
|
btnClear = new javax.swing.JButton();
|
||||||
|
chatContent = new javax.swing.JLayeredPane();
|
||||||
|
jScrollPane1 = new javax.swing.JScrollPane();
|
||||||
|
taEmpfangen = new javax.swing.JTextArea();
|
||||||
|
jScrollPane2 = new javax.swing.JScrollPane();
|
||||||
|
taSenden = new javax.swing.JTextArea();
|
||||||
|
jMenuBar1 = new javax.swing.JMenuBar();
|
||||||
|
jMenu2 = new javax.swing.JMenu();
|
||||||
|
jMenu3 = new javax.swing.JMenu();
|
||||||
|
|
||||||
|
javax.swing.GroupLayout jDialogServerClientLayout = new javax.swing.GroupLayout(jDialogServerClient.getContentPane());
|
||||||
|
jDialogServerClient.getContentPane().setLayout(jDialogServerClientLayout);
|
||||||
|
jDialogServerClientLayout.setHorizontalGroup(
|
||||||
|
jDialogServerClientLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
|
.addGap(0, 400, Short.MAX_VALUE)
|
||||||
|
);
|
||||||
|
jDialogServerClientLayout.setVerticalGroup(
|
||||||
|
jDialogServerClientLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
|
.addGap(0, 300, Short.MAX_VALUE)
|
||||||
|
);
|
||||||
|
|
||||||
|
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
|
||||||
|
|
||||||
|
chatControll.setLayout(new java.awt.FlowLayout());
|
||||||
|
|
||||||
|
btnSend.setText("send");
|
||||||
|
chatControll.add(btnSend);
|
||||||
|
|
||||||
|
btnClear.setText("clear");
|
||||||
|
chatControll.add(btnClear);
|
||||||
|
|
||||||
|
getContentPane().add(chatControll, java.awt.BorderLayout.PAGE_END);
|
||||||
|
|
||||||
|
chatContent.setLayout(new javax.swing.BoxLayout(chatContent, javax.swing.BoxLayout.PAGE_AXIS));
|
||||||
|
|
||||||
|
taEmpfangen.setColumns(20);
|
||||||
|
taEmpfangen.setRows(5);
|
||||||
|
jScrollPane1.setViewportView(taEmpfangen);
|
||||||
|
|
||||||
|
chatContent.add(jScrollPane1);
|
||||||
|
|
||||||
|
taSenden.setColumns(20);
|
||||||
|
taSenden.setRows(5);
|
||||||
|
jScrollPane2.setViewportView(taSenden);
|
||||||
|
|
||||||
|
chatContent.add(jScrollPane2);
|
||||||
|
|
||||||
|
getContentPane().add(chatContent, java.awt.BorderLayout.CENTER);
|
||||||
|
|
||||||
|
jMenu2.setText("File");
|
||||||
|
jMenuBar1.add(jMenu2);
|
||||||
|
|
||||||
|
jMenu3.setText("Edit");
|
||||||
|
jMenuBar1.add(jMenu3);
|
||||||
|
|
||||||
|
setJMenuBar(jMenuBar1);
|
||||||
|
|
||||||
|
pack();
|
||||||
|
}// </editor-fold>//GEN-END:initComponents
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param args the command line arguments
|
||||||
|
*/
|
||||||
|
public static void main(String args[])
|
||||||
|
{
|
||||||
|
/* Set the Nimbus look and feel */
|
||||||
|
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
|
||||||
|
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
|
||||||
|
* For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
|
||||||
|
*/
|
||||||
|
try
|
||||||
|
{
|
||||||
|
for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels())
|
||||||
|
{
|
||||||
|
if ("Nimbus".equals(info.getName()))
|
||||||
|
{
|
||||||
|
javax.swing.UIManager.setLookAndFeel(info.getClassName());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (ClassNotFoundException ex)
|
||||||
|
{
|
||||||
|
java.util.logging.Logger.getLogger(ChatView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
|
||||||
|
}
|
||||||
|
catch (InstantiationException ex)
|
||||||
|
{
|
||||||
|
java.util.logging.Logger.getLogger(ChatView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
|
||||||
|
}
|
||||||
|
catch (IllegalAccessException ex)
|
||||||
|
{
|
||||||
|
java.util.logging.Logger.getLogger(ChatView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
|
||||||
|
}
|
||||||
|
catch (javax.swing.UnsupportedLookAndFeelException ex)
|
||||||
|
{
|
||||||
|
java.util.logging.Logger.getLogger(ChatView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
|
||||||
|
}
|
||||||
|
//</editor-fold>
|
||||||
|
|
||||||
|
/* Create and display the form */
|
||||||
|
java.awt.EventQueue.invokeLater(new Runnable()
|
||||||
|
{
|
||||||
|
public void run()
|
||||||
|
{
|
||||||
|
new ChatView().setVisible(true);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||||
|
private javax.swing.JButton btnClear;
|
||||||
|
private javax.swing.JButton btnSend;
|
||||||
|
private javax.swing.JLayeredPane chatContent;
|
||||||
|
private javax.swing.JLayeredPane chatControll;
|
||||||
|
private javax.swing.JDialog jDialogServerClient;
|
||||||
|
private javax.swing.JMenu jMenu2;
|
||||||
|
private javax.swing.JMenu jMenu3;
|
||||||
|
private javax.swing.JMenuBar jMenuBar1;
|
||||||
|
private javax.swing.JScrollPane jScrollPane1;
|
||||||
|
private javax.swing.JScrollPane jScrollPane2;
|
||||||
|
private javax.swing.JTextArea taEmpfangen;
|
||||||
|
private javax.swing.JTextArea taSenden;
|
||||||
|
// End of variables declaration//GEN-END:variables
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user