Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
- /*
- * CPLoader.java
- *
- * Created on Aug 6, 2011, 2:33:42 PM
- */
- /**
- *
- * @author uj
- */
- public class CPLoader extends javax.swing.JFrame {
- /** Creates new form CPLoader */
- public CPLoader() {
- 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">
- private void initComponents() {
- jLabel1 = new javax.swing.JLabel();
- loadWebsite = new javax.swing.JButton();
- setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
- setTitle("Rune Resort Control Panel");
- setBackground(new java.awt.Color(102, 102, 102));
- setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
- setName("RRCP"); // NOI18N
- setResizable(false);
- jLabel1.setFont(new java.awt.Font("Calibri", 1, 18)); // NOI18N
- jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
- jLabel1.setText("Rune Resort Client Control Panel");
- jLabel1.setName("jLabel1"); // NOI18N
- loadWebsite.setFont(new java.awt.Font("Calibri", 0, 18)); // NOI18N
- loadWebsite.setText("Go to Website");
- loadWebsite.setName("loadWebsite"); // NOI18N
- loadWebsite.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- loadWebsiteActionPerformed(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()
- .addContainerGap()
- .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 433, Short.MAX_VALUE)
- .addComponent(loadWebsite, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 433, Short.MAX_VALUE))
- .addContainerGap())
- );
- layout.setVerticalGroup(
- layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(layout.createSequentialGroup()
- .addContainerGap()
- .addComponent(jLabel1)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
- .addComponent(loadWebsite, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
- );
- pack();
- }// </editor-fold>
- private void loadWebsiteActionPerformed(java.awt.event.ActionEvent evt) {
- sendToURL("http://www.runeresort.com/");
- }
- // /**
- // * @param args the command line arguments
- // */
- // public static void main(String args[]) {
- // java.awt.EventQueue.invokeLater(new Runnable() {
- // public void run() {
- // new CPLoader().setVisible(true);
- // }
- // });
- // }
- // Variables declaration - do not modify
- protected javax.swing.JLabel jLabel1;
- protected javax.swing.JButton loadWebsite;
- // End of variables declaration
- public void sendToURL(String url) {
- try {
- java.awt.Desktop.getDesktop().browse(java.net.URI.create(url));
- } catch (Exception exception) {
- //log("[ERROR]SendToURL: " + exception.getLocalizedMessage());
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement