June 29, 2012

Java Help

How to create java help menu for you stand alone application ?



This example will help you to create java help file for your system side application. The screen shot is shown in figure below. The developer needs Net Bean IDE 5 or above.

java help file example

Tutorial
Download example






Thanking you....

June 18, 2012

Eclipse plugin for uml diagram

  Online uml2 plugin for eclipse


             Now let us take a look on software reverse engineering process.For that we need UML2 plugin. This post will tell you how to install UML2 eclipse plugin to your eclipse ide. Make it sure you are using the latest Eclipse IDE.


Steps

  1.  Start Eclipse
  2.  Navigate to help
  3.  Select software updates
  4.  Available software tabs
  5.  Add site and Enter the following url : http://downloads.myeclipseide.com/downloads/products/eworkbench/helios/enterprise-earlyaccess/

Thanking you......
          

June 10, 2012

JFrame

 The Example demonstrate a login application using java swing. On button click user enter into next screen. copy, paste and Run it. Better use an Eclispe IDE
 Login JFrame Example

 /**
 *
 */
package com.blog.belazy.Frame;

import javax.swing.SwingUtilities;
import java.awt.BorderLayout;
import javax.swing.JPanel;
import javax.swing.JFrame;
import javax.swing.JButton;
import java.awt.Rectangle;

/**
 * @author Belazy *
 */
public class FrameLogin extends JFrame {

    private static final long serialVersionUID = 1L;
    private JPanel jContentPane = null;
    private JButton loginButton = null;
    private MainFrame mainFrame = null;
    private FrameLogin thisClass = null;

    /**
     * This method initializes loginButton  
     *   
     * @return javax.swing.JButton  
     */
    private JButton getLoginButton() {
        if (loginButton == null) {
            loginButton = new JButton();
            loginButton.setBounds(new Rectangle(96, 67, 98, 41));
            loginButton.setText("Login");
            loginButton.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent e) {
                    mainFrame = new MainFrame();
                    mainFrame.setVisible(true);
                    dispose();
                }
            });
        }
        return loginButton;
    }

    /**
     * @param args
     */
    public static void main(String[] args) {
        // TODO Auto-generated method stub
        SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                FrameLogin thisClass = new FrameLogin();
                thisClass.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                thisClass.setVisible(true);
            }
        });
    }

    /**
     * This is the default constructor
     */
    public FrameLogin() {
        super();
        initialize();
    }

    /**
     * This method initializes this
     *
     * @return void
     */
    private void initialize() {
        this.setSize(300, 200);
        this.setContentPane(getJContentPane());
        this.setTitle("JFrame");
    }

    /**
     * This method initializes jContentPane
     *
     * @return javax.swing.JPanel
     */
    private JPanel getJContentPane() {
        if (jContentPane == null) {
            jContentPane = new JPanel();
            jContentPane.setLayout(null);
            jContentPane.add(getLoginButton(), null);
        }
        return jContentPane;
    }
  


}









---------------------------------------------------------------------------------------------

/**
 *
 */
package com.blog.belazy.Frame;

import java.awt.BorderLayout;
import java.awt.event.ActionListener;

import javax.swing.JPanel;
import javax.swing.JFrame;
import javax.swing.JButton;
import java.awt.Rectangle;

/**
 * @author Belazy *
 */
public class MainFrame extends JFrame {

    private static final long serialVersionUID = 1L;
    private JPanel jContentPane = null;
    private FrameLogin frame = null;
    private JButton jButton = null;

    /**
     * This is the default constructor
     */


    public MainFrame(FrameLogin f) {
       
        super();
        this.frame = f;
        initialize();
   
    }

    public MainFrame() {
        super();
        initialize();
    }

    /**
     * This method initializes this
     *
     * @return void
     */
    private void initialize() {
        this.setSize(300, 200);
        this.setContentPane(getJContentPane());
        this.setTitle("JFrame");
    }

    /**
     * This method initializes jContentPane
     *
     * @return javax.swing.JPanel
     */
    private JPanel getJContentPane() {
        if (jContentPane == null) {
            jContentPane = new JPanel();
            jContentPane.setLayout(null);
            jContentPane.add(getJButton(), null);
        }
        return jContentPane;
    }

    /**
     * This method initializes jButton   
     *    
     * @return javax.swing.JButton   
     */
    private JButton getJButton() {
        if (jButton == null) {
            jButton = new JButton();
            jButton.setBounds(new Rectangle(79, 69, 121, 38));
            jButton.setText("delete");
            jButton.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent e) {
                   
                    deleteOld();
                    System.out.println("actionPerformed()"); // TODO Auto-generated Event stub actionPerformed()
                }
            });
        }
        return jButton;
    }

    protected void deleteOld() {
        frame.dispose();
       
    }

}

Thanking you....

Facebook comments