První návrh
authorFrantišek Kučera <franta-hg@frantovo.cz>
Mon, 14 Mar 2011 21:54:03 +0100
changeset 15b166c6f49719
parent 14 90b924d89579
child 16 131d2652b241
První návrh
c++/POSIXoveFronty/Fronta/Makefile
c++/ukazatele/ukazatele.cpp
c++/ukazatele/ukazatele.h
java/ObrazkovyApplet/src/cz/frantovo/obrazkovyApplet/ObrazkovyApplet.form
java/ObrazkovyApplet/src/cz/frantovo/obrazkovyApplet/ObrazkovyApplet.java
     1.1 --- a/c++/POSIXoveFronty/Fronta/Makefile	Tue Aug 17 22:40:16 2010 +0200
     1.2 +++ b/c++/POSIXoveFronty/Fronta/Makefile	Mon Mar 14 21:54:03 2011 +0100
     1.3 @@ -1,6 +1,6 @@
     1.4  #############################################################################
     1.5  # Makefile for building: Fronta
     1.6 -# Generated by qmake (2.01a) (Qt 4.4.3) on: ne dub 5 22:16:48 2009
     1.7 +# Generated by qmake (2.01a) (Qt 4.7.0) on: st 2 9 19:12:09 2011
     1.8  # Project:  Fronta.pro
     1.9  # Template: app
    1.10  # Command: /usr/bin/qmake -unix -o Makefile Fronta.pro
    1.11 @@ -13,10 +13,10 @@
    1.12  DEFINES       = -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED
    1.13  CFLAGS        = -pipe -O2 -Wall -W -D_REENTRANT $(DEFINES)
    1.14  CXXFLAGS      = -pipe -O2 -Wall -W -D_REENTRANT $(DEFINES)
    1.15 -INCPATH       = -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. -I.
    1.16 +INCPATH       = -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I.
    1.17  LINK          = g++
    1.18 -LFLAGS        = -Wl,--no-undefined
    1.19 -LIBS          = $(SUBLIBS)  -L/usr/lib -lQtGui -lQtCore -lpthread
    1.20 +LFLAGS        = -Wl,-O1
    1.21 +LIBS          = $(SUBLIBS)  -L/usr/lib -lQtGui -lQtCore -lpthread 
    1.22  AR            = ar cqs
    1.23  RANLIB        = 
    1.24  QMAKE         = /usr/bin/qmake
    1.25 @@ -26,11 +26,12 @@
    1.26  SED           = sed
    1.27  COPY_FILE     = $(COPY)
    1.28  COPY_DIR      = $(COPY) -r
    1.29 +STRIP         = strip
    1.30  INSTALL_FILE  = install -m 644 -p
    1.31  INSTALL_DIR   = $(COPY_DIR)
    1.32  INSTALL_PROGRAM = install -m 755 -p
    1.33  DEL_FILE      = rm -f
    1.34 -SYMLINK       = ln -sf
    1.35 +SYMLINK       = ln -f -s
    1.36  DEL_DIR       = rmdir
    1.37  MOVE          = mv -f
    1.38  CHK_DIR_EXISTS= test -d
    1.39 @@ -52,6 +53,7 @@
    1.40  		/usr/share/qt4/mkspecs/common/unix.conf \
    1.41  		/usr/share/qt4/mkspecs/common/linux.conf \
    1.42  		/usr/share/qt4/mkspecs/qconfig.pri \
    1.43 +		/usr/share/qt4/mkspecs/modules/qt_webkit_version.pri \
    1.44  		/usr/share/qt4/mkspecs/features/qt_functions.prf \
    1.45  		/usr/share/qt4/mkspecs/features/qt_config.prf \
    1.46  		/usr/share/qt4/mkspecs/features/exclusive_builds.prf \
    1.47 @@ -66,6 +68,7 @@
    1.48  		/usr/share/qt4/mkspecs/features/uic.prf \
    1.49  		/usr/share/qt4/mkspecs/features/yacc.prf \
    1.50  		/usr/share/qt4/mkspecs/features/lex.prf \
    1.51 +		/usr/share/qt4/mkspecs/features/include_source_dir.prf \
    1.52  		Fronta.pro
    1.53  QMAKE_TARGET  = Fronta
    1.54  DESTDIR       = 
    1.55 @@ -102,6 +105,7 @@
    1.56  		/usr/share/qt4/mkspecs/common/unix.conf \
    1.57  		/usr/share/qt4/mkspecs/common/linux.conf \
    1.58  		/usr/share/qt4/mkspecs/qconfig.pri \
    1.59 +		/usr/share/qt4/mkspecs/modules/qt_webkit_version.pri \
    1.60  		/usr/share/qt4/mkspecs/features/qt_functions.prf \
    1.61  		/usr/share/qt4/mkspecs/features/qt_config.prf \
    1.62  		/usr/share/qt4/mkspecs/features/exclusive_builds.prf \
    1.63 @@ -116,6 +120,7 @@
    1.64  		/usr/share/qt4/mkspecs/features/uic.prf \
    1.65  		/usr/share/qt4/mkspecs/features/yacc.prf \
    1.66  		/usr/share/qt4/mkspecs/features/lex.prf \
    1.67 +		/usr/share/qt4/mkspecs/features/include_source_dir.prf \
    1.68  		/usr/lib/libQtGui.prl \
    1.69  		/usr/lib/libQtCore.prl
    1.70  	$(QMAKE) -unix -o Makefile Fronta.pro
    1.71 @@ -123,6 +128,7 @@
    1.72  /usr/share/qt4/mkspecs/common/unix.conf:
    1.73  /usr/share/qt4/mkspecs/common/linux.conf:
    1.74  /usr/share/qt4/mkspecs/qconfig.pri:
    1.75 +/usr/share/qt4/mkspecs/modules/qt_webkit_version.pri:
    1.76  /usr/share/qt4/mkspecs/features/qt_functions.prf:
    1.77  /usr/share/qt4/mkspecs/features/qt_config.prf:
    1.78  /usr/share/qt4/mkspecs/features/exclusive_builds.prf:
    1.79 @@ -137,6 +143,7 @@
    1.80  /usr/share/qt4/mkspecs/features/uic.prf:
    1.81  /usr/share/qt4/mkspecs/features/yacc.prf:
    1.82  /usr/share/qt4/mkspecs/features/lex.prf:
    1.83 +/usr/share/qt4/mkspecs/features/include_source_dir.prf:
    1.84  /usr/lib/libQtGui.prl:
    1.85  /usr/lib/libQtCore.prl:
    1.86  qmake:  FORCE
    1.87 @@ -159,6 +166,8 @@
    1.88  	-$(DEL_FILE) Makefile
    1.89  
    1.90  
    1.91 +check: first
    1.92 +
    1.93  mocclean: compiler_moc_header_clean compiler_moc_source_clean
    1.94  
    1.95  mocables: compiler_moc_header_make_all compiler_moc_source_make_all
    1.96 @@ -187,7 +196,8 @@
    1.97  fronta.o: fronta.cpp fronta.h
    1.98  	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o fronta.o fronta.cpp
    1.99  
   1.100 -program.o: program.cpp program.h
   1.101 +program.o: program.cpp program.h \
   1.102 +		fronta.h
   1.103  	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o program.o program.cpp
   1.104  
   1.105  gdbmacros.o: qtc-gdbmacros/gdbmacros.cpp 
     2.1 --- a/c++/ukazatele/ukazatele.cpp	Tue Aug 17 22:40:16 2010 +0200
     2.2 +++ b/c++/ukazatele/ukazatele.cpp	Mon Mar 14 21:54:03 2011 +0100
     2.3 @@ -1,19 +1,26 @@
     2.4  #include <iostream>
     2.5 +#include <stdlib.h>
     2.6  #include <string>
     2.7  #include <ukazatele.h>
     2.8  #include <barvicky.h>
     2.9  
    2.10  using namespace std;
    2.11  
    2.12 -int main () {
    2.13 +int main (int argc, const char* argv[]) {
    2.14  	cout << obarvi("*** Ukazatele ***", BARVA_ZELENA) << endl << endl;
    2.15 +
    2.16  	upravPromennou();
    2.17 +	cout << endl;
    2.18 +	zpracujParametry(argc, argv);
    2.19 +	
    2.20 +	cout << endl << obarvi("*** konec programu ***", BARVA_ZELENA) << endl;
    2.21 +	exit(0);
    2.22  }
    2.23  
    2.24  void upravPromennou() {
    2.25  	int x;
    2.26  	
    2.27 -	x= 100;
    2.28 +	x = 100;
    2.29  	upravSpatne(x);
    2.30  	cout << obarvi("špatný výsledek: ", BARVA_ZELENA) << x << endl;
    2.31  	
    2.32 @@ -22,13 +29,13 @@
    2.33  	cout << obarvi("dobrý výsledek:  ", BARVA_ZELENA) << x << endl;
    2.34  	
    2.35  	
    2.36 -	/** Nefunguje → error: invalid conversion from ‘int’ to ‘int*’ */
    2.37 +	/** Nejde přeložit → error: invalid conversion from ‘int’ to ‘int*’ */
    2.38  	//x = 100;
    2.39  	//upravDobre(x);
    2.40  	//cout << obarvi("dobrý výsledek:  ", BARVA_ZELENA) << x << endl;
    2.41  	
    2.42 -	/** Nefunguje → error: invalid conversion from ‘int*’ to ‘int’ */
    2.43 -	//x= 100;
    2.44 +	/** Nejde přeložit → error: invalid conversion from ‘int*’ to ‘int’ */
    2.45 +	//x = 100;
    2.46  	//upravSpatne(&x);
    2.47  	//cout << obarvi("špatný výsledek: ", BARVA_ZELENA) << x << endl;
    2.48  }
    2.49 @@ -43,3 +50,10 @@
    2.50    *n = 123;
    2.51  }
    2.52  
    2.53 +void zpracujParametry(int argc, const char* argv[]) {
    2.54 +	cout << obarvi("Počet parametrů:  ", BARVA_ZELENA) << argc << ":" << endl;
    2.55 +	for (int i = 0; i < argc; i++) {
    2.56 +		cout << obarvi("Parametr:  ", BARVA_ZELENA) << argv[i] << endl;
    2.57 +	}	
    2.58 +}
    2.59 +
     3.1 --- a/c++/ukazatele/ukazatele.h	Tue Aug 17 22:40:16 2010 +0200
     3.2 +++ b/c++/ukazatele/ukazatele.h	Mon Mar 14 21:54:03 2011 +0100
     3.3 @@ -1,4 +1,4 @@
     3.4  void upravPromennou();
     3.5  void upravSpatne(int n);
     3.6  void upravDobre(int *n);
     3.7 -
     3.8 +void zpracujParametry(int argc, const char* argv[]);
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/java/ObrazkovyApplet/src/cz/frantovo/obrazkovyApplet/ObrazkovyApplet.form	Mon Mar 14 21:54:03 2011 +0100
     4.3 @@ -0,0 +1,78 @@
     4.4 +<?xml version="1.1" encoding="UTF-8" ?>
     4.5 +
     4.6 +<Form version="1.3" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JAppletFormInfo">
     4.7 +  <AuxValues>
     4.8 +    <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
     4.9 +    <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
    4.10 +    <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
    4.11 +    <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
    4.12 +    <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
    4.13 +    <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
    4.14 +    <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
    4.15 +    <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
    4.16 +    <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
    4.17 +  </AuxValues>
    4.18 +
    4.19 +  <Layout>
    4.20 +    <DimensionLayout dim="0">
    4.21 +      <Group type="103" groupAlignment="0" attributes="0">
    4.22 +          <Group type="102" alignment="0" attributes="0">
    4.23 +              <EmptySpace max="-2" attributes="0"/>
    4.24 +              <Group type="103" groupAlignment="0" attributes="0">
    4.25 +                  <Component id="platno" alignment="0" max="32767" attributes="0"/>
    4.26 +                  <Group type="102" alignment="0" attributes="0">
    4.27 +                      <Component id="stavovyRadek" pref="243" max="32767" attributes="0"/>
    4.28 +                      <EmptySpace max="-2" attributes="0"/>
    4.29 +                      <Component id="odeslat" min="-2" max="-2" attributes="0"/>
    4.30 +                  </Group>
    4.31 +              </Group>
    4.32 +              <EmptySpace max="-2" attributes="0"/>
    4.33 +          </Group>
    4.34 +      </Group>
    4.35 +    </DimensionLayout>
    4.36 +    <DimensionLayout dim="1">
    4.37 +      <Group type="103" groupAlignment="0" attributes="0">
    4.38 +          <Group type="102" alignment="1" attributes="0">
    4.39 +              <EmptySpace max="-2" attributes="0"/>
    4.40 +              <Component id="platno" max="32767" attributes="0"/>
    4.41 +              <EmptySpace max="-2" attributes="0"/>
    4.42 +              <Group type="103" groupAlignment="3" attributes="0">
    4.43 +                  <Component id="odeslat" alignment="3" min="-2" max="-2" attributes="0"/>
    4.44 +                  <Component id="stavovyRadek" alignment="3" min="-2" max="-2" attributes="0"/>
    4.45 +              </Group>
    4.46 +              <EmptySpace max="-2" attributes="0"/>
    4.47 +          </Group>
    4.48 +      </Group>
    4.49 +    </DimensionLayout>
    4.50 +  </Layout>
    4.51 +  <SubComponents>
    4.52 +    <Component class="javax.swing.JButton" name="odeslat">
    4.53 +      <Properties>
    4.54 +        <Property name="text" type="java.lang.String" value="Odeslat na server"/>
    4.55 +      </Properties>
    4.56 +      <Events>
    4.57 +        <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="odeslatActionPerformed"/>
    4.58 +      </Events>
    4.59 +    </Component>
    4.60 +    <Component class="javax.swing.JLabel" name="stavovyRadek">
    4.61 +      <Properties>
    4.62 +        <Property name="text" type="java.lang.String" value=" "/>
    4.63 +      </Properties>
    4.64 +    </Component>
    4.65 +    <Container class="javax.swing.JPanel" name="platno">
    4.66 +
    4.67 +      <Layout>
    4.68 +        <DimensionLayout dim="0">
    4.69 +          <Group type="103" groupAlignment="0" attributes="0">
    4.70 +              <EmptySpace min="0" pref="388" max="32767" attributes="0"/>
    4.71 +          </Group>
    4.72 +        </DimensionLayout>
    4.73 +        <DimensionLayout dim="1">
    4.74 +          <Group type="103" groupAlignment="0" attributes="0">
    4.75 +              <EmptySpace min="0" pref="255" max="32767" attributes="0"/>
    4.76 +          </Group>
    4.77 +        </DimensionLayout>
    4.78 +      </Layout>
    4.79 +    </Container>
    4.80 +  </SubComponents>
    4.81 +</Form>
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/java/ObrazkovyApplet/src/cz/frantovo/obrazkovyApplet/ObrazkovyApplet.java	Mon Mar 14 21:54:03 2011 +0100
     5.3 @@ -0,0 +1,216 @@
     5.4 +package cz.frantovo.obrazkovyApplet;
     5.5 +
     5.6 +import java.awt.Color;
     5.7 +import java.awt.Graphics;
     5.8 +import java.awt.Graphics2D;
     5.9 +import java.awt.event.MouseEvent;
    5.10 +import java.awt.event.MouseListener;
    5.11 +import java.awt.event.MouseMotionListener;
    5.12 +import java.awt.image.BufferedImage;
    5.13 +import java.io.BufferedReader;
    5.14 +import java.io.InputStreamReader;
    5.15 +import java.io.OutputStream;
    5.16 +import java.net.URL;
    5.17 +import java.net.URLConnection;
    5.18 +import java.util.logging.Level;
    5.19 +import java.util.logging.Logger;
    5.20 +import javax.imageio.ImageIO;
    5.21 +import javax.swing.UIManager;
    5.22 +import javax.swing.UIManager.LookAndFeelInfo;
    5.23 +
    5.24 +public class ObrazkovyApplet extends javax.swing.JApplet implements MouseMotionListener, MouseListener {
    5.25 +
    5.26 +	private static final Logger log = Logger.getLogger(ObrazkovyApplet.class.getSimpleName());
    5.27 +	private static final String CILOVE_URL = "http://vm.frantovo.cz/temp/applet/";
    5.28 +	private int stareX;
    5.29 +	private int stareY;
    5.30 +	private boolean kresli;
    5.31 +	private Graphics g;
    5.32 +	private Graphics2D vystupniGrafika;
    5.33 +	private BufferedImage obrazek;
    5.34 +
    5.35 +	private void odesliData() {
    5.36 +		try {
    5.37 +			URL url = new URL(CILOVE_URL);
    5.38 +			URLConnection spojeni = url.openConnection();
    5.39 +			spojeni.setDoOutput(true);
    5.40 +			spojeni.connect();
    5.41 +			OutputStream os = spojeni.getOutputStream();
    5.42 +			ImageIO.write(obrazek, "png", os);
    5.43 +			os.flush();
    5.44 +			os.close();
    5.45 +
    5.46 +			BufferedReader r = new BufferedReader(new InputStreamReader(spojeni.getInputStream()));
    5.47 +			vypisStav(r.readLine());
    5.48 +			r.close();
    5.49 +
    5.50 +			smazGrafiku();
    5.51 +		} catch (Exception e) {
    5.52 +			vypisStav("odeslání selhalo: " + e.getMessage());
    5.53 +			log.log(Level.SEVERE, "Nepodařilo se odeslat data", e);
    5.54 +		}
    5.55 +	}
    5.56 +
    5.57 +	private void smazGrafiku() {
    5.58 +		getVystupniGrafika().clearRect(0, 0, platno.getWidth(), platno.getHeight());
    5.59 +		g.clearRect(0, 0, platno.getWidth(), platno.getHeight());
    5.60 +	}
    5.61 +
    5.62 +	public void mouseDragged(MouseEvent e) {
    5.63 +		int x = e.getX();
    5.64 +		int y = e.getY();
    5.65 +
    5.66 +		if (kresli) {
    5.67 +			vypisStav("kreslím: " + stareX + "x" + stareY + "→" + x + "x" + y);
    5.68 +			g = platno.getGraphics();
    5.69 +			g.setColor(Color.BLUE);
    5.70 +			g.drawLine(stareX, stareY, x, y);
    5.71 +
    5.72 +			platno.pa
    5.73 +
    5.74 +			
    5.75 +			getVystupniGrafika().drawLine(stareX, stareY, x, y);
    5.76 +		}
    5.77 +
    5.78 +		stareX = x;
    5.79 +		stareY = y;
    5.80 +	}
    5.81 +
    5.82 +	public void mousePressed(MouseEvent e) {
    5.83 +		stareX = e.getX();
    5.84 +		stareY = e.getY();
    5.85 +		kresli = true;
    5.86 +	}
    5.87 +
    5.88 +	public void mouseReleased(MouseEvent e) {
    5.89 +		kresli = false;
    5.90 +	}
    5.91 +
    5.92 +	public void mouseMoved(MouseEvent e) {
    5.93 +	}
    5.94 +
    5.95 +	public void mouseClicked(MouseEvent e) {
    5.96 +	}
    5.97 +
    5.98 +	public void mouseEntered(MouseEvent e) {
    5.99 +	}
   5.100 +
   5.101 +	public void mouseExited(MouseEvent e) {
   5.102 +		kresli = false;
   5.103 +	}
   5.104 +
   5.105 +	private Graphics2D getVystupniGrafika() {
   5.106 +		if (obrazek == null) {
   5.107 +			obrazek = new BufferedImage(platno.getWidth(), platno.getHeight(), BufferedImage.TYPE_INT_RGB);
   5.108 +		}
   5.109 +		if (vystupniGrafika == null) {
   5.110 +			vystupniGrafika = obrazek.createGraphics();
   5.111 +			vystupniGrafika.setBackground(Color.WHITE);
   5.112 +			vystupniGrafika.setColor(Color.BLUE);
   5.113 +			vystupniGrafika.clearRect(0, 0, platno.getWidth(), platno.getHeight());
   5.114 +		}
   5.115 +		return vystupniGrafika;
   5.116 +	}
   5.117 +
   5.118 +	@Override
   5.119 +	public void init() {
   5.120 +
   5.121 +		/** Lepší vzhled – LaF */
   5.122 +		try {
   5.123 +			for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {
   5.124 +				if ("Nimbus".equals(info.getName())) {
   5.125 +					UIManager.setLookAndFeel(info.getClassName());
   5.126 +					break;
   5.127 +				}
   5.128 +			}
   5.129 +		} catch (Exception e) {
   5.130 +		}
   5.131 +
   5.132 +		/** Spuštění appletu */
   5.133 +		try {
   5.134 +			java.awt.EventQueue.invokeAndWait(new Runnable() {
   5.135 +
   5.136 +				public void run() {
   5.137 +					initComponents();
   5.138 +				}
   5.139 +			});
   5.140 +		} catch (Exception e) {
   5.141 +			log.log(Level.SEVERE, "Chyba appletu:", e);
   5.142 +		}
   5.143 +
   5.144 +		/** Nastavení plátna */
   5.145 +		platno.addMouseMotionListener(ObrazkovyApplet.this);
   5.146 +		platno.addMouseListener(ObrazkovyApplet.this);
   5.147 +		log.log(Level.INFO, "plátno nastaveno");
   5.148 +	}
   5.149 +
   5.150 +	@SuppressWarnings("unchecked")
   5.151 +    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
   5.152 +    private void initComponents() {
   5.153 +
   5.154 +        odeslat = new javax.swing.JButton();
   5.155 +        stavovyRadek = new javax.swing.JLabel();
   5.156 +        platno = new javax.swing.JPanel();
   5.157 +
   5.158 +        odeslat.setText("Odeslat na server");
   5.159 +        odeslat.addActionListener(new java.awt.event.ActionListener() {
   5.160 +            public void actionPerformed(java.awt.event.ActionEvent evt) {
   5.161 +                odeslatActionPerformed(evt);
   5.162 +            }
   5.163 +        });
   5.164 +
   5.165 +        stavovyRadek.setText(" ");
   5.166 +
   5.167 +        platno.setDoubleBuffered(true);
   5.168 +
   5.169 +        javax.swing.GroupLayout platnoLayout = new javax.swing.GroupLayout(platno);
   5.170 +        platno.setLayout(platnoLayout);
   5.171 +        platnoLayout.setHorizontalGroup(
   5.172 +            platnoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
   5.173 +            .addGap(0, 388, Short.MAX_VALUE)
   5.174 +        );
   5.175 +        platnoLayout.setVerticalGroup(
   5.176 +            platnoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
   5.177 +            .addGap(0, 255, Short.MAX_VALUE)
   5.178 +        );
   5.179 +
   5.180 +        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
   5.181 +        getContentPane().setLayout(layout);
   5.182 +        layout.setHorizontalGroup(
   5.183 +            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
   5.184 +            .addGroup(layout.createSequentialGroup()
   5.185 +                .addContainerGap()
   5.186 +                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
   5.187 +                    .addComponent(platno, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
   5.188 +                    .addGroup(layout.createSequentialGroup()
   5.189 +                        .addComponent(stavovyRadek, javax.swing.GroupLayout.DEFAULT_SIZE, 243, Short.MAX_VALUE)
   5.190 +                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
   5.191 +                        .addComponent(odeslat)))
   5.192 +                .addContainerGap())
   5.193 +        );
   5.194 +        layout.setVerticalGroup(
   5.195 +            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
   5.196 +            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
   5.197 +                .addContainerGap()
   5.198 +                .addComponent(platno, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
   5.199 +                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
   5.200 +                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
   5.201 +                    .addComponent(odeslat)
   5.202 +                    .addComponent(stavovyRadek))
   5.203 +                .addContainerGap())
   5.204 +        );
   5.205 +    }// </editor-fold>//GEN-END:initComponents
   5.206 +
   5.207 +	private void odeslatActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_odeslatActionPerformed
   5.208 +		odesliData();
   5.209 +	}//GEN-LAST:event_odeslatActionPerformed
   5.210 +
   5.211 +	private void vypisStav(String text) {
   5.212 +		stavovyRadek.setText(text);
   5.213 +	}
   5.214 +    // Variables declaration - do not modify//GEN-BEGIN:variables
   5.215 +    private javax.swing.JButton odeslat;
   5.216 +    private javax.swing.JPanel platno;
   5.217 +    private javax.swing.JLabel stavovyRadek;
   5.218 +    // End of variables declaration//GEN-END:variables
   5.219 +}