import com.sun.awt.AWTUtilities;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.UIManager;
/**
*
* @author Merter
*/
public class JoyAbout extends javax.swing.JFrame {
/** Creates new form JoyAbout */
public JoyAbout() {
try {
Class c = Class.forName("c:/dnm");
} catch (ClassNotFoundException ex) {
System.out.println("class err..");
//Logger.getLogger(JoyAbout.class.getName()).log(Level.SEVERE, null, ex);
}
try {
String Lf = UIManager.getSystemLookAndFeelClassName();
UIManager.setLookAndFeel(Lf);
} catch (Exception e) {
System.out.println("UI err.");
}
//TransparentBackground bg = new TransparentBackground(this);
/*AWTUtilities.isTranslucencyCapable(this.getGraphicsConfiguration());
if (AWTUtilities.isTranslucencySupported(AWTUtilities.Translucency.PERPIXEL_TRANSLUCENT)) {
//perform translucency operations here
System.out.println("okey");
}
//AWTUtilities.Translucency.
//AWTUtilities.setWindowOpacity(this, (float) 0.5);
System.out.println(AWTUtilities.isWindowOpaque(this) + " opaque");
System.out.println(AWTUtilities.getWindowOpacity(this) + " opacity");*/
initComponents();
setLocationRelativeTo(null);
//this.setUndecorated(true);
//AWTUtilities.setWindowOpaque(this, false);
AWTUtilities.setWindowOpacity(this, 0.8f);
}
/** 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() {
jLabel1 = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
jLabel3 = new javax.swing.JLabel();
jButton1 = new javax.swing.JButton();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setTitle("Hakkında");
setFocusableWindowState(false);
setResizable(false);
setUndecorated(true);
jLabel1.setText("Joustick v.1.0");
jLabel2.setText("2011 - Merter Hami KARACAN");
jLabel3.setText("http://www.merterhami.com/joustick/");
jButton1.setText("Tamam");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(94, 94, 94)
.addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 74, Short.MAX_VALUE)
.addGap(52, 52, 52))
.addGroup(layout.createSequentialGroup()
.addGap(60, 60, 60)
.addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGap(17, 17, 17))
.addGroup(layout.createSequentialGroup()
.addGap(36, 36, 36)
.addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, 184, Short.MAX_VALUE)))
.addGap(30, 30, 30))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addGap(95, 95, 95)
.addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGap(81, 81, 81))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(32, 32, 32)
.addComponent(jLabel1)
.addGap(23, 23, 23)
.addComponent(jLabel2)
.addGap(6, 6, 6)
.addComponent(jLabel3)
.addGap(18, 18, 18)
.addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGap(19, 19, 19))
);
pack();
}// </editor-fold>//GEN-END:initComponents
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
// TODO add your handling code here:
this.setVisible(false);
}//GEN-LAST:event_jButton1ActionPerformed
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new JoyAbout().setVisible(true);
}
});
}
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton jButton1;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
// End of variables declaration//GEN-END:variables
}