Monday 19 January 2015

Carrots

These sweet, crunchy veggies may help control blood sugar levels and make diabetes less likely. They may also help your cholesterol levels, since they're a source of soluble fiber -- the kind of fiber also found in oats.
Tip: Add shredded carrots to spaghetti sauce and muffin batter.

Swiss Chard

The dark green, leafy vegetable is rich in potassium and magnesium, minerals that help control blood pressure. You'll also get fiber, vitamin A, and the antioxidants lutein and zeaxanthin from these greens.
Tip: Serve with grilled meats or as a bed for fish. Saute with olive oil and garlic until wilted; season with herbs and pepper

Oranges

This sweet, juicy fruit has the cholesterol-fighting fiber pectin as well as potassium, which helps control blood pressure. Research shows that OJ may make your blood vessels work better and lower blood pressure a bit.
Tip: A medium orange averages 62 calories with 3 grams of fiber.

 Green Edamame BeansMiso Soup with TofuUncooked Sweet PotatoSlice of OrangeLeaf of Red ChardStack of CarrotsUncooked BarleyFlaxseed AssortmentHeart Foods
Tip: Try frozen edamame. Boil and serve warm in the pod.

Tofu

Serve up tofu, and you get a great form of vegetarian soy protein with its heart-healthy minerals, fiber, and polyunsaturated fats. It can take on the taste of the spices or sauces you use to cook it.
Tips: Chop firm tofu, marinate, then grill or stir-fry, going easy on the oil. Add tofu to soups for protein with no added fat.

Sweet Potatoes

Swap out white potatoes for sweet potatoes. With a low glycemic index, these spuds won't cause a quick spike in blood sugar. They also have fiber, vitamin A, and lycopene.
Tip: Boost their natural sweetness with cinnamon and lime juice, rather than sugary toppings.

Barley

Try this nutty whole grain in place of rice with dinner, or simmer barley into soups and stews. The fiber in barley can help lower cholesterol levels and may lower blood sugar levels, too.
Tip: Hulled or "whole grain" barley is the most nutritious. Barley grits are toasted and ground -- nice for cereal or as a side dish. Pearl barley is quick, but much of its fiber has been removed.

Oatmeal

Oats in all forms can help your heart by lowering LDL, the "bad" cholesterol. A warm bowl of oatmeal fills you up for hours, fights snack attacks, and helps keep blood sugar levels stable over time -- very useful for people with diabetes.
Tips: Trade oats for one-third of the flour in pancakes, muffins, and baked goods. Use oats instead of bread

Flaxseed

This shiny, honey-colored seed has three things that are good for your heart: fiber, phytochemicals called lignans, and ALA, an omega-3 fatty acid found in plants.
Tips: Grind flaxseed for the best nutrition. Add it to cereal, baked goods, yogurt, or mustard on a sandwich.

Coffee

Coffee and tea may help protect your heart -- even decaf coffee works! Studies show that people who drink 3-4 cups a day may be less likely to get diabetes, too. If you already have high blood pressure, be careful, since caffeine can make it worse.
Tip: Choose black coffee or a non-fat latte to limit fat and calories.

Foods Fortified With Sterols

Some margarines, soy milks, almond milks, and orange juices have cholesterol-fighting sterols and stanols added. These plant extracts block cholesterol absorption in the gut and can lower LDL levels by 10% without affecting good cholesterol.
Tip: Eat or drink at least 2 grams of sterols a day.

Tub of Margarine

Salt in Measuring Spoon 

Kosher Salt

It could be worth a try for people with high blood pressure. The larger kosher salt crystals have more flavor than regular table salt, so you might use less and end up with less sodium. But measure carefully. A teaspoon of kosher salt has 1,120-2,000 mg of sodium, and the daily limit for people with high blood pressure is 1,500 mg.
 

Blueberries

Blueberries are simply brilliant when it comes to nutrition. Their anthocyanins give them their deep blue color and support heart health. Blueberries also have beta-carotene, lutein, vitamin C, folate, magnesium, potassium, and fiber.

Tips: Add fresh or dried blueberries to cereal, pancakes, or yogurt. Puree a batch for a dessert sauce
Spoonful of Blueberries

SDLC

Software Development Life Cycle

SDLC Activities

SDLC provides a series of steps to be followed to design and develop a software product efficiently. SDLC framework includes the following steps:
SDLC

Communication

This is the first step where the user initiates the request for a desired software product. He contacts the service provider and tries to negotiate the terms. He submits his request to the service providing organization in writing.

Requirement Gathering

This step onwards the software development team works to carry on the project. The team holds discussions with various stakeholders from problem domain and tries to bring out as much information as possible on their requirements. The requirements are contemplated and segregated into user requirements, system requirements and functional requirements. The requirements are collected using a number of practices as given -
  • studying the existing or obsolete system and software,
  • conducting interviews of users and developers,
  • referring to the database or
  • collecting answers from the questionnaires.

Feasibility Study

After requirement gathering, the team comes up with a rough plan of software process. At this step the team analyzes if a software can be made to fulfill all requirements of the user and if there is any possibility of software being no more useful. It is found out, if the project is financially, practically and technologically feasible for the organization to take up. There are many algorithms available, which help the developers to conclude the feasibility of a software project.

System Analysis

At this step the developers decide a roadmap of their plan and try to bring up the best software model suitable for the project. System analysis includes Understanding of software product limitations, learning system related problems or changes to be done in existing systems beforehand, identifying and addressing the impact of project on organization and personnel etc. The project team analyzes the scope of the project and plans the schedule and resources accordingly.

Software Design

Next step is to bring down whole knowledge of requirements and analysis on the desk and design the software product. The inputs from users and information gathered in requirement gathering phase are the inputs of this step. The output of this step comes in the form of two designs; logical design and physical design. Engineers produce meta-data and data dictionaries, logical diagrams, data-flow diagrams and in some cases pseudo codes.

Coding

This step is also known as programming phase. The implementation of software design starts in terms of writing program code in the suitable programming language and developing error-free executable programs efficiently.

Testing

An estimate says that 50% of whole software development process should be tested. Errors may ruin the software from critical level to its own removal. Software testing is done while coding by the developers and thorough testing is conducted by testing experts at various levels of code such as module testing, program testing, product testing, in-house testing and testing the product at user’s end. Early discovery of errors and their remedy is the key to reliable software.

Integration

Software may need to be integrated with the libraries, databases and other program(s). This stage of SDLC is involved in the integration of software with outer world entities.

Implementation

This means installing the software on user machines. At times, software needs post-installation configurations at user end. Software is tested for portability and adaptability and integration related issues are solved during implementation.

Operation and Maintenance

This phase confirms the software operation in terms of more efficiency and less errors. If required, the users are trained on, or aided with the documentation on how to operate the software and how to keep the software operational. The software is maintained timely by updating the code according to the changes taking place in user end environment or technology. This phase may face challenges from hidden bugs and real-world unidentified problems.

Disposition

As time elapses, the software may decline on the performance front. It may go completely obsolete or may need intense upgradation. Hence a pressing need to eliminate a major portion of the system arises. This phase includes archiving data and required software components, closing down the system, planning disposition activity and terminating system at appropriate end-of-system time.

Software Development Paradigm

The software development paradigm helps developer to select a strategy to develop the software. A software development paradigm has its own set of tools, methods and procedures, which are expressed clearly and defines software development life cycle. A few of software development paradigms or process models are defined as follows:

Waterfall Model

Waterfall model is the simplest model of software development paradigm. It says the all the phases of SDLC will function one after another in linear manner. That is, when the first phase is finished then only the second phase will start and so on.
This model assumes that everything is carried out and taken place perfectly as planned in the previous stage and there is no need to think about the past issues that may arise in the next phase. This model does not work smoothly if there are some issues left at the previous step. The sequential nature of model does not allow us go back and undo or redo our actions.
This model is best suited when developers already have designed and developed similar software in the past and are aware of all its domains.

Iterative Model

This model leads the software development process in iterations. It projects the process of development in cyclic manner repeating every step after every cycle of SDLC process.
Iterative Model The software is first developed on very small scale and all the steps are followed which are taken into consideration. Then, on every next iteration, more features and modules are designed, coded, tested and added to the software. Every cycle produces a software, which is complete in itself and has more features and capabilities than that of the previous one.
After each iteration, the management team can do work on risk management and prepare for the next iteration. Because a cycle includes small portion of whole software process, it is easier to manage the development process but it consumes more resources.

Spiral Model

Spiral model is a combination of both, iterative model and one of the SDLC model. It can be seen as if you choose one SDLC model and combine it with cyclic process (iterative model).
Spiral Model This model considers risk, which often goes un-noticed by most other models. The model starts with determining objectives and constraints of the software at the start of one iteration. Next phase is of prototyping the software. This includes risk analysis. Then one standard SDLC model is used to build the software. In the fourth phase of the plan of next iteration is prepared.

V – model

The major drawback of waterfall model is we move to the next stage only when the previous one is finished and there was no chance to go back if something is found wrong in later stages. V-Model provides means of testing of software at each stage in reverse manner.
V-Model At every stage, test plans and test cases are created to verify and validate the product according to the requirement of that stage. For example, in requirement gathering stage the test team prepares all the test cases in correspondence to the requirements. Later, when the product is developed and is ready for testing, test cases of this stage verify the software against its validity towards requirements at this stage.
This makes both verification and validation go in parallel. This model is also known as verification and validation model.

Big Bang Model (TIME EFFORT RESOURCES)

This model is the simplest model in its form. It requires little planning, lots of programming and lots of funds. This model is conceptualized around the big bang of universe. As scientists say that after big bang lots of galaxies, planets and stars evolved just as an event. Likewise, if we put together lots of programming and funds, you may achieve the best software product.
For this model, very small amount of planning is required. It does not follow any process, or at times the customer is not sure about the requirements and future needs. So the input requirements are arbitrary.
This model is not suitable for large software projects but good one for learning and experimenting.

Sunday 18 January 2015

Successful Quotes

Have to be very careful in Exams whether it is Online, Written, Any type.

Offer a 2 rakah Nafil Namaz then go for exams. 


Before dua Offer 2 rakah Namaz 

Wazifa for Success in Exams and Court Case (For Muslims)

wazifa for success in court case
wazifa for success in court case
 wazifa for get success in exam
wazifa for get success in exam
Source from Islamicduas
Here are expert of giving wazifa for success in business, studies, education, exams, job interview, court case, visa and everything other type of problems solutions in urdu and english.

Success in business, studies, education, urdu, urdu, job, job interview, court case, visa
 
Today we are facing much type of problems and going here and there searching for solutions. But many times we are not able to found proper solutions for our problems. We have the solutions but unaware of it.
Here We are giving a wazifa for get success in exam, studies, job interview etc. purpose.

Before going to exam or interview Pray a Namaz of 2 rakah of nafil Namaz then read this dua for 7 times and daily in the early morning repeat it for 101 times. You will get success in exam or job surely inshallah:

If you are facing trouble with court cases and you are not able to win your case then use this wazifa for win court case.  Read this wazifa daily 313 times and pray to god for win case then surely after some time you will see good news. That you have win a court case.
Above wazifas can be used for solve everything problems of life. So if you want to get more wazifa for solve any type of like business and family dispute then contact us we will give you wazifa and procedure to use the wazifa.

Tuesday 13 January 2015

The site name will be changed to gistsolutionsz.blogspot.com effectively from 26-1-2015

Monday 12 January 2015

Addicted to Pornography

Are you addicted to Pornography? Do you watch it alone or with your spouse? Do you make excuses to yourself to justify that its ok to watch it? A short advice on why these diseases have now infested our societies even though we possess Islam, The most beautiful way of life!

Pornography addiction is a behavioral addiction characterized by compulsive, repeated use of pornographic material until it causes serious negative consequences to one's physical, mental, social, and/or financial well-being.

Addiction to Internet pornography is also a form of cybersex addiction. There is no diagnosis of pornography addiction in the current Diagnostic and Statistical Manual of Mental Disorders .

Problematic Internet pornography viewing is viewing of Internet pornography that is problematic for an individual for personal, or social reasons, or reasons such as time spent viewing or viewing in problematic situations. Individuals may report depression, social isolation, career loss or decreased productivity, and financial consequences as a result of their problematic Internet pornography viewing.


Addicted to Porn

Friday 2 January 2015

Simple but Strong Program on Indian Flag in JAVA using Applet

import java.awt.*;
import java.applet.*;
/*<applet code=Flag.class width=300 height=200></applet>*/
public class Flag extends Applet {
 public void paint(Graphics g) {
  g.setColor(Color.orange);
  g.fillRect(20,10,270,30);
  g.setColor(Color.white);
  g.fillRect(20,40,270,30);
  g.setColor(Color.green);
  g.fillRect(20,70,270,30);
  g.setColor(Color.blue);
  g.drawOval(135,42,25,25);
  g.drawLine(148,42,148,67);
  g.drawLine(136,54,161,54);
  g.drawLine(140,46,156,62);
  g.drawLine(154,46,140,64);
  g.setColor(Color.black);
  g.fillRect(15,10,5,200);
 }
}

Oldest and Best Visual Basic

Visual Basic - Check Box, Option Button and Frame


Step1: Place One Label, one Text Box, Two Frames, Two Option Buttons, Three Check Boxes and a Command Button on the Form1
Step2: Rename the Control Caption in the Property Window as follows
 
Form1 -> Option & Check
Label1 -> Enter Text Here:
Frame1 -> Case
Frame2 -> Effects
Option1 -> Upper
Option2 -> Lower
Check1 -> Strike Through
Check2 -> Under Line
Check3 -> Bold
Command1 -> Exit
 
Change the Text1 Properties as multiline True and ScrollBars as Both
Enter the following codes in the corresponding controls
Private Sub Check1_Click()
If Check1.Value = 1 Then
Text1.Font.Strikethrough = True
Else
Text1.Font.Strikethrough = False
End If
End Sub

Private Sub Check2_Click()
If Check2.Value = 1 Then
Text1.Font.Underline = True
Else
Text1.Font.Underline = False
End If
End Sub

Private Sub Check3_Click()
If Check3.Value = 1 Then
Text1.Font.Bold = True
Else
Text1.Font.Bold = False
End If
End Sub

Private Sub Command1_Click()
End
End Sub

Private Sub Form_Load()
Option2.Value = True
End Sub

Private Sub Option1_Click()
If Option1.Value = True Then
 Text1.Text = UCase(Text1)
 End If
 End Sub

Private Sub Option2_Click()
If Option2.Value = True Then
Text1.Text = LCase(Text1)
End If
End Sub

 Step3: Run the Application by pressing F5

DATA STRUCTURE 

Java program for Linked list (Lists)


import java.util.*;

public class LinkedListDemo{
public static void main(String[] args){
LinkedList link=new LinkedList();
link.add("a");
link.add("b");
link.add(new Integer(10));
System.out.println("The contents of array is" + link);
System.out.println("The size of an linkedlist is" + link.size());

link.addFirst(new Integer(20));
System.out.println("The contents of array is" + link);
System.out.println("The size of an linkedlist is" + link.size());

link.addLast("c");
System.out.println("The contents of array is" + link);
System.out.println("The size of an linkedlist is" + link.size());

link.add(2,"j");
System.out.println("The contents of array is" + link);
System.out.println("The size of an linkedlist is" + link.size());

link.add(1,"t");
System.out.println("The contents of array is" + link);
System.out.println("The size of an linkedlist is" + link.size());

link.remove(3);
System.out.println("The contents of array is" + link);
System.out.println("The size of an linkedlist is" + link.size());
}
}

JAVA program for creating a minimum spanning tree using Kruskal's algorithm for Shortest Path


#include<iostream.h>
#include<conio.h>
#include<stdlib.h>

struct edge
{
    int u;
    int v;
    int weight;
    struct edge *link;
};

class kruskals
{
private:
    struct edge *front,tree[20];
    int father[20],n,wt_tree,count;
public:
    kruskals()
    {
       front=NULL;
       wt_tree=0;
       count=0;
       cout<<"Enter total no. of nodes in graph : ";
       cin>>n;
    }
    void create_graph();
    void make_tree();
    void insert_tree(int i,int j, int wt);
    void insert_priorityQ(int i,int j,int wt);
    struct edge *del_priorityQ();
    void display();
};

void kruskals::create_graph()
{
    int wt,max_edges,origin,destin;
    max_edges=n*(n-1)/2;
    for(int i=1;i<=max_edges;i++)
    {
        cout<<"Enter edge "<<i<<" (0 0 to quit) : ";
        cin>>origin>>destin;
        if((origin==0)&&(destin==0))
              break;
        cout<<"Enter weight of this edge : ";
        cin>>wt;
        if(origin>n || destin>n || origin<=0 || destin<=0)
        {
            cout<<"Invalid edge! "<<endl;
            i--;
        }
        else
        insert_priorityQ(origin,destin,wt);
    }
    if(i<n-1)
    {
        cout<<"Spanning tree is not possible "<<endl;
                getch();
        exit(1);
    }
}

void kruskals::make_tree()
{
    struct edge *temp;
    int node1,node2, root_n1,root_n2;

    while(count<n-1)
    {
        for(int i=0;i<20;i++)
                      father[i]=NULL;
        temp=del_priorityQ();
        node1=temp->u;
        node2=temp->v;
        cout<<endl<<"n1="<<node1<<"    "<<"n2="<<node2<<"     ";
        while(node1>0)
        {
             root_n1=node1;
             node1=father[node1];
        }
        while(node2>0)
        {
             root_n2=node2;
             node2=father[node2];
        }
        cout<<"rootn1="<<root_n1<<"     "<<"rootn2="<<root_n2<<endl;

        if(root_n1 != root_n2)
        {
              insert_tree(temp->u,temp->v,temp->weight);
              wt_tree=wt_tree+temp->weight;
              father[root_n2]=root_n1;
        }
    }
}

void kruskals::insert_tree(int i, int j, int wt)
{
    cout<<"This edge inserted in the spanning tree "<<endl;
    count++;
    tree[count].u=i;
    tree[count].v=j;
    tree[count].weight=wt;
}

void kruskals::insert_priorityQ(int i, int j, int wt)
{
    struct edge *temp,*q;

    temp=new edge;
    temp->u=i;
    temp->v=j;
    temp->weight=wt;

    if(front==NULL || temp->weight<front->weight)
    {
        temp->link =front;
        front=temp;
    }
    else
    {
        q=front;
        while(q->link !=NULL && q->link->weight<=temp->weight)
              q=q->link;
        temp->link=q->link;
        q->link=temp;
        if(q->link==NULL)
               temp->link=NULL;
    }
}

struct edge* kruskals::del_priorityQ()
{
    struct edge *temp;
    temp=front;
    cout<<"Edge processed is "<<temp->u<<"->"<<temp->v<<":"<<temp->weight;
    front=front->link;
    return temp;
}

void kruskals::display()
{
    cout<<"Edges to be included in spanning tree are : "<<endl;
    for(int i=1;i<=count;i++)
    {
       cout<<"("<<tree[i].u<<" ";
       cout<<tree[i].v<<")   ";
    }
    cout<<endl
        <<"Weight of this minimum spanning tree is : " <<wt_tree;
}

void main()
{
clrscr();
kruskals k;
k.create_graph();
k.make_tree();
k.display();
getch();
}

Program to find largest and smallest number in an array in JAVA


public class FindLargestSmallestNumber {
public static void main(String[] args) {

//array of 10 numbers

int numbers[] = new int[]{32,43,53,54,32,65,63,98,43,23};

//assign first element of an array to largest and smallest

int smallest = numbers[0];

int largetst = numbers[0];

for(int i=1; i< numbers.length; i++) { if(numbers[i] > largetst)

largetst = numbers[i];

else if (numbers[i] < smallest) smallest = numbers[i]; } System.out.println("Largest Number is : " + largetst); System.out.println("Smallest Number is : " + smallest); } }

Java Bank Program Just see the logic and it will be easy for you.

/*
    program:bankAccount
    Name:JustinLubarsky
    Date:Dec 2010
*/
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.text.*;

public class bankAccount extends JFrame
{
    /* ------------------------- declarations */

    // color objects
   
    Color black = new Color(0, 0, 0);
    Color white = new Color(255, 255, 255);
    Color light_gray = new Color(192, 192, 192);

    // inputs
   
    JLabel depositAmmountJLabel;
    JTextField depositAmmountJTextField;
   
    JLabel withdrawAmmountJLabel;
    JTextField withdrawAmmountJTextField;

    // outputs
   
    JLabel currentBalanceJLabel;
    JTextField currentBalanceJTextField;
   
    JLabel currentStatusJLabel;
    JTextField currentStatusJTextField;

    // controls
   
    JButton enterJButton;
    JButton clearJButton;
    JButton closeJButton;

    // variables
   
    int startingBalance = 0;
    Double depositAmmount;
    Double withdrawAmmount;
    Double currentBalance;
    String currentStatus;

    // objects classes
   
    DecimalFormat decimalFormat;

    public bankAccount()   
    {
        createUserInterface();
    }

    public void createUserInterface()
    {
        Container contentPane = getContentPane();
        contentPane.setBackground(white);
        contentPane.setLayout(null);
       
        //*--------------------- initialize *\

        // inputs
       
        depositAmmountJLabel = new JLabel();
        depositAmmountJLabel.setBounds(50, 50, 120, 20);
        depositAmmountJLabel.setFont(new Font("Default", Font.PLAIN, 12));
        depositAmmountJLabel.setText("Deposit Ammount");
        depositAmmountJLabel.setForeground(black);
        depositAmmountJLabel.setHorizontalAlignment(JLabel.LEFT);
        contentPane.add(depositAmmountJLabel);

        depositAmmountJTextField = new JTextField();
        depositAmmountJTextField.setBounds(200, 50, 80, 20);
        depositAmmountJTextField.setFont(new Font("Default", Font.PLAIN, 12));
        depositAmmountJTextField.setHorizontalAlignment(JTextField.CENTER);
        depositAmmountJTextField.setForeground(black);
        depositAmmountJTextField.setBackground(white);
        depositAmmountJTextField.setEditable(true);
        contentPane.add(depositAmmountJTextField);
       
        withdrawAmmountJLabel = new JLabel();
        withdrawAmmountJLabel.setBounds(50, 80, 120, 20);
        withdrawAmmountJLabel.setFont(new Font("Default", Font.PLAIN, 12));
        withdrawAmmountJLabel.setText("Withdraw Ammount");
        withdrawAmmountJLabel.setForeground(black);
        withdrawAmmountJLabel.setHorizontalAlignment(JLabel.LEFT);
        contentPane.add(withdrawAmmountJLabel);

        withdrawAmmountJTextField = new JTextField();
        withdrawAmmountJTextField.setBounds(200, 80, 80, 20);
        withdrawAmmountJTextField.setFont(new Font("Default", Font.PLAIN, 12));
        withdrawAmmountJTextField.setHorizontalAlignment(JTextField.CENTER);
        withdrawAmmountJTextField.setForeground(black);
        withdrawAmmountJTextField.setBackground(white);
        withdrawAmmountJTextField.setEditable(true);
        contentPane.add(withdrawAmmountJTextField);

        // outputs
       
        currentBalanceJLabel = new JLabel();
        currentBalanceJLabel.setBounds(50, 110, 100, 20);
        currentBalanceJLabel.setFont(new Font("Default", Font.PLAIN, 12));
        currentBalanceJLabel.setText("Current Balance");
        currentBalanceJLabel.setForeground(black);
        currentBalanceJLabel.setHorizontalAlignment(JLabel.LEFT);
        contentPane.add(currentBalanceJLabel);

        currentBalanceJTextField = new JTextField();
        currentBalanceJTextField.setBounds(200, 110, 80, 20);
        currentBalanceJTextField.setFont(new Font("Default", Font.PLAIN, 12));
        currentBalanceJTextField.setHorizontalAlignment(JTextField.CENTER);
        currentBalanceJTextField.setForeground(black);
        currentBalanceJTextField.setBackground(white);
        currentBalanceJTextField.setEditable(false);
        contentPane.add(currentBalanceJTextField);
       
        currentStatusJLabel = new JLabel();
        currentStatusJLabel.setBounds(50, 140, 100, 20);
        currentStatusJLabel.setFont(new Font("Default", Font.PLAIN, 12));
        currentStatusJLabel.setText("Account Status");
        currentStatusJLabel.setForeground(black);
        currentStatusJLabel.setHorizontalAlignment(JLabel.LEFT);
        contentPane.add(currentStatusJLabel);

        currentStatusJTextField = new JTextField();
        currentStatusJTextField.setBounds(200, 140, 120, 20);
        currentStatusJTextField.setFont(new Font("Default", Font.PLAIN, 12));
        currentStatusJTextField.setHorizontalAlignment(JTextField.CENTER);
        currentStatusJTextField.setForeground(black);
        currentStatusJTextField.setBackground(white);
        currentStatusJTextField.setEditable(false);
        contentPane.add(currentStatusJTextField);

        // controls
       
        enterJButton = new JButton();
        enterJButton.setBounds(20, 300, 100, 20);
        enterJButton.setFont(new Font("Default", Font.PLAIN, 12));
        enterJButton.setText("Enter");
        enterJButton.setForeground(black);
        enterJButton.setBackground(white);
        contentPane.add(enterJButton);
        enterJButton.addActionListener(

            new ActionListener()
            {
                public void actionPerformed(ActionEvent event)
                {
                    enterJButtonActionPerformed(event);
                }
            }
        );

        clearJButton = new JButton();
        clearJButton.setBounds(150, 300, 100, 20);
        clearJButton.setFont(new Font("Default", Font.PLAIN, 12));
        clearJButton.setText("Clear");
        clearJButton.setForeground(black);
        clearJButton.setBackground(white);
        contentPane.add(clearJButton);
        clearJButton.addActionListener(

            new ActionListener()
            {
                public void actionPerformed(ActionEvent event)
                {
                    clearJButtonActionPerformed(event);
                }
            }
        );

        closeJButton = new JButton();
        closeJButton.setBounds(280, 300, 100, 20);
        closeJButton.setFont(new Font("Default", Font.PLAIN, 12));
        closeJButton.setText("Close");
        closeJButton.setForeground(black);
        closeJButton.setBackground(white);
        contentPane.add(closeJButton);
        closeJButton.addActionListener(

            new ActionListener()
            {
                public void actionPerformed(ActionEvent event)
                {
                    closeJButtonActionPerformed(event);
                }
            }
        );

        setTitle("bankAccount");
        setSize(400, 400);
        setVisible(true);
    }

    // main method
   
    public  static void main(String[] args)
    {
        bankAccount application = new bankAccount();
        application.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    }
   
    public void enterJButtonActionPerformed(ActionEvent event)
    {
        getDepositAmmount();
        getWithdrawAmount();
    }
   
    public void getDepositAmmount()
    {
        try
        {
            depositAmmount = Double.parseDouble(depositAmmountJTextField.getText());
            getWithdrawAmount();
         }
        catch(NumberFormatException exception)
        {
            JOptionPane.showMessageDialog(this,
            "Please enter a deposit amount!",
            "Number format Error", JOptionPane.ERROR_MESSAGE);
            depositAmmountJTextField.setText("");
            depositAmmountJTextField.requestFocusInWindow();
        }
    }
   
    public void getWithdrawAmount()
    {
        try
        {
            withdrawAmmount = Double.parseDouble(withdrawAmmountJTextField.getText());
            getCurrentBalance();
         }
        catch(NumberFormatException exception)
        {
            JOptionPane.showMessageDialog(this,
            "Please enter a withdraw amount!",
            "Number format Error", JOptionPane.ERROR_MESSAGE);
            withdrawAmmountJTextField.setText("");
            withdrawAmmountJTextField.requestFocusInWindow();
        }
    }
   
    /*public void getCurrentBalance()
    {
        currentBalance = withdrawAmmount + startingBalance;
        displayCurrentBalance();
    } // for withdraw*/
   
    public void getCurrentBalance()
    {
        currentBalance = startingBalance + depositAmmount - withdrawAmmount;
        displayCurrentBalance();
    }
   
    public void displayCurrentBalance()
    {
        decimalFormat = new DecimalFormat("$0.00");
        currentBalanceJTextField.setText("" + decimalFormat.format(currentBalance));
        getCurrentStatus();
    }
   
    public void getCurrentStatus()
    {
        if(currentBalance > 0 ) 
        {
            currentStatus = "Sufficient Funds";
        }
        else if (currentBalance <= 0) 
        {
            currentStatus = "Insufficient Funds";
        }
       
        currentStatusJTextField.setText("" + currentStatus);
        displayCurrentStatus(); 
    }
   
    public void displayCurrentStatus()
    {
        currentStatusJTextField.setText("" + currentStatus);
    }
   
    /*public void getWithdrawAmmount()
    {
        try
        {
            withdrawAmmount = Integer.parseInt(withdrawAmmountJTextField.getText());
            //getWithdrawAmmount();
         }
        catch(NumberFormatException exception)
        {
            JOptionPane.showMessageDialog(this,
            "Please enter a number!",
            "Number format Error", JOptionPane.ERROR_MESSAGE);
            withdrawAmmountJTextField.setText("");
            withdrawAmmountJTextField.requestFocusInWindow();
        }
    }*/
   
        public void clearJButtonActionPerformed(ActionEvent event)
    {
        depositAmmountJTextField.setText("");
        withdrawAmmountJTextField.setText("");
    }

    public void closeJButtonActionPerformed(ActionEvent event)
    {
        bankAccount.this.dispose();
    }
}
JAVA Program for creating a Sub-menu

//Java Core Package
import javax.swing.*;
//Java Extension Package
import java.awt.*;

public class creatingSubJMenuItem extends JFrame {

 //Initializing program components
 private JMenu menus;
 private JMenuBar bar;
 private JMenu mainItem[];
 private JMenuItem subItems[];

 //Setting up GUI
    public creatingSubJMenuItem() {
   
     //Setting up the Title of the Window
     super("Creating a Sub JMenuItem");

     //Set Size of the Window (WIDTH, HEIGHT)
     setSize(350,200);

     //Exit Property of the Window
     setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
 
  //Constructing JMenu "File" with mnemonic 'F'
     menus = new JMenu("File");
     menus.setMnemonic('F');
   
     //Constructing main JMenu and add it in JMenu "File"
     mainItem = new JMenu[1];
   
     for(int count=0; count<mainItem.length; count++){
      mainItem[count] = new JMenu("Main Menu "+(count+1));
      menus.add(mainItem[count]); //Adding JMenu "mainItem" in the JMenu "File"
     }
   
     //Constructing JMenuItem "subItems" as a Sub Menu to the main JMenu
     subItems = new JMenuItem[5];
   
     for(int count=0; count<subItems.length; count++){
      subItems[count] = new JMenuItem("Sub Menu "+(count+1));
      mainItem[0].add(subItems[count]); //Adding JMenuItem "subItems" in the JMenu "mainItem"
     }
   
     //Constructing JMenuBar
     bar = new JMenuBar();
     bar.add(menus); //Adding the JMenu "File" in the JMenuBar
   
     //Setting up the JMenuBar in the container
     setJMenuBar(bar);

     //Setting up the container ready for the components to be added.
     Container pane = getContentPane();
     setContentPane(pane);

     /**Set all the Components Visible.
      * If it is set to "false", the components in the container will not be visible.
      */
     setVisible(true);
    }
  
 //Main Method
    public static void main (String[] args) {
     creatingSubJMenuItem csjmi = new creatingSubJMenuItem();
 }
}

After Execution