T-K-O-T

java sozluk kod gui licenseinfo java

001: /*
002: * LicenseInfo.java
003: */
004:
005: package GUI;
006:
007: import java.io.BufferedReader;
008: import java.io.FileInputStream;
009: import java.io.FileReader;
010: import java.io.IOException;
011: import java.io.InputStreamReader;
012:
013: /**
014: * Lisans sözleşmelerini göstermeye yarayan sınıftır. Licenses klasöründen
015: * gerekli lisans dosyalarını okuyarak, kullanıcıya, programları gösterir.
016: * @author Çağatay ÇEBİ - http://www.cagataycebi.com
017: */
018: public class LicenseInfo extends javax.swing.JFrame {
019:
020: /** Creates new form LicenseInfo */
021: public LicenseInfo() {
022: initComponents( );
023: text_area.setText( read_file( "licenses/README.TXT" ) );
024: text_area.setCaretPosition( 0 );
025: }
026:
027: /** This method is called from within the constructor to
028: * initialize the form.
029: * WARNING: Do NOT modify this code. The content of this method is
030: * always regenerated by the Form Editor.
031: */
032: // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
033: private void initComponents() {
034: jButton1 = new javax.swing.JButton();
035: jButton2 = new javax.swing.JButton();
036: jButton3 = new javax.swing.JButton();
037: jScrollPane1 = new javax.swing.JScrollPane();
038: text_area = new javax.swing.JTextArea();
039: jLabel1 = new javax.swing.JLabel();
040: jLabel2 = new javax.swing.JLabel();
041:
042: setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
043: setTitle("JavaSu00f6zlu00fck - Hakku0131nda");
044: setName("LicenseInfo");
045: addWindowListener(new java.awt.event.WindowAdapter() {
046: public void windowClosing(java.awt.event.WindowEvent evt) {
047: formWindowClosing(evt);
048: }
049: });
050:
051: jButton1.setText("Program Lisansu0131");
052: jButton1.addActionListener(new java.awt.event.ActionListener() {
053: public void actionPerformed(java.awt.event.ActionEvent evt) {
054: jButton1ActionPerformed(evt);
055: }
056: });
057:
058: jButton2.setText("GPL Tu00fcrku00e7e");
059: jButton2.addActionListener(new java.awt.event.ActionListener() {
060: public void actionPerformed(java.awt.event.ActionEvent evt) {
061: jButton2ActionPerformed(evt);
062: }
063: });
064:
065: jButton3.setText("GPL u0130ngilizce");
066: jButton3.addActionListener(new java.awt.event.ActionListener() {
067: public void actionPerformed(java.awt.event.ActionEvent evt) {
068: jButton3ActionPerformed(evt);
069: }
070: });
071:
072: text_area.setColumns(20);
073: text_area.setEditable(false);
074: text_area.setLineWrap(true);
075: text_area.setRows(5);
076: text_area.setWrapStyleWord(true);
077: jScrollPane1.setViewportView(text_area);
078:
079: jLabel1.setText("JavaSu00f6zlu00fck v1.1.2 Eylu00fcl 2006");
080:
081: jLabel2.setText("u00c7au011fatay u00c7EBu0130 - http://www.cagataycebi.com");
082:
083: org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
084: getContentPane().setLayout(layout);
085: layout.setHorizontalGroup(
086: layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
087: .add(layout.createSequentialGroup()
088: .addContainerGap()
089: .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
090: .add(jLabel2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 362, Short.MAX_VALUE)
091: .add(jLabel1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 362, Short.MAX_VALUE)
092: .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 362, Short.MAX_VALUE)
093: .add(layout.createSequentialGroup()
094: .add(jButton1)
095: .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
096: .add(jButton2)
097: .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
098: .add(jButton3)))
099: .addContainerGap())
100: );
101: layout.setVerticalGroup(
102: layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
103: .add(layout.createSequentialGroup()
104: .addContainerGap()
105: .add(jLabel1)
106: .add(1, 1, 1)
107: .add(jLabel2)
108: .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
109: .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
110: .add(jButton1)
111: .add(jButton2)
112: .add(jButton3))
113: .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
114: .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 244, Short.MAX_VALUE)
115: .addContainerGap())
116: );
117: pack();
118: }// </editor-fold>//GEN-END:initComponents
119:
120: private void formWindowClosing(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowClosing
121: MainEntry.is_license_info_open = false;
122: }//GEN-LAST:event_formWindowClosing
123:
124: private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
125: // Program lisansı
126: text_area.setText( read_file( "licenses/README.TXT" ) );
127: text_area.setCaretPosition( 0 );
128: }//GEN-LAST:event_jButton1ActionPerformed
129:
130: private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed
131: // İngilizce GPL
132: text_area.setText( read_file( "licenses/GPL_eng.TXT" ) );
133: text_area.setCaretPosition( 0 );
134: }//GEN-LAST:event_jButton3ActionPerformed
135:
136: private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
137: // Türkçe GPL
138: text_area.setText( read_file( "licenses/GPL_tr.TXT" ) );
139: text_area.setCaretPosition( 0 );
140: }//GEN-LAST:event_jButton2ActionPerformed
141:
142: private String read_file( String file_address )
143: {
144: String str;
145: StringBuffer file_content = new StringBuffer( );
146: try {
147: BufferedReader in =
148: new BufferedReader(
149: new InputStreamReader(
150: new FileInputStream( file_address ),"ISO-8859-9" ) );
151: while ( ( str = in.readLine( ) ) != null ) {
152: file_content.append( " " + str + " n" );
153: }
154: in.close();
155: }
156: catch( IOException e ) {
157: System.err.println(e);
158: }
159: str = file_content.toString();
160: file_content = null;
161: return str;
162: }
163:
164: // Variables declaration - do not modify//GEN-BEGIN:variables
165: private javax.swing.JButton jButton1;
166: private javax.swing.JButton jButton2;
167: private javax.swing.JButton jButton3;
168: private javax.swing.JLabel jLabel1;
169: private javax.swing.JLabel jLabel2;
170: private javax.swing.JScrollPane jScrollPane1;
171: private javax.swing.JTextArea text_area;
172: // End of variables declaration//GEN-END:variables
173:
174: }
 
Reklamı Sola Kaydır

Resim Galerisi

Galeri'ye Git

Sosyal Medya'da Biz!

Bu web sitesi ücretsiz olarak Bedava-Sitem.com ile oluşturulmuştur. Siz de kendi web sitenizi kurmak ister misiniz?
Ücretsiz kaydol