• Home
  • Outdoor Adventure
    • Hiking
    • Backpacking
    • Camping
    • Caving
  • Travel
  • Life Style
    • Diploma Life
    • Degree Life
    • Work and Part Time
  • Code Test and Project
  • FYP

Jack Hau Story

facebook twitter instagram

This form is Patient Information for staff to enter patients details such as patient id, patient name, patient gender, patient ic, patient contact no and patient email. Besides that, we set few button at the bottom for easy way to key in record, delete record or switch to other page. Those buttons such as Main, delete record, add record, save record, search record and proceed to appointment form button. It’s useful because we can proceed to next form or switch back to that form easily. The advantage that we design this form is to reduce data redundancy and save time. It can avoid our database appear repeated data.


This is a complete report that show all patients information such as patient id, patient name, patient gender, patient contact no, patient email. The advantage come out of this report is for staff to view their clinic have how many patient.


This form is Staff Information for staff to enter staff details such as staff id, staff name, staff gender, staff ic, staff contact no and staff email. The advantage that we design this form is to reduce data redundancy and save time. It can avoid our database appear repeated data


This report complete to show staff detail such as staff id, staff name, staff contact no, staff email. The advantage come out of this report is easy for clinic keep track staff. For example, some emergency case needs immediacy calling staff come back clinic


This form is about Patient Appointment. We can enter a unique appointment code, patient id, staff id, appointment date and appointment reason. At the same time, we use combo box in Staff ID, so that when adding new staff the system will automatically update on Appointment form. The advantage come out with this form is measure appointment time with no collision happens


This report clearly list out all the staff and every day of patient appointment such as staff id, patient id, appointment id, appointment date, appointment reason. The advantage come out of this report is for staff to explicitly view their appointment at which date and the patient appointment reason

Sample VB code showing appointment in dialog :
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        PrintDialog1.Document = PrintDocument1
        PrintDialog1.PrinterSettings = PrintDocument1.PrinterSettings
        PrintDialog1.AllowSomePages = True
        If PrintDialog1.ShowDialog = DialogResult.OK Then
            PrintDocument1.PrinterSettings = PrintDialog1.PrinterSettings
            PrintDocument1.Print()
        End If
    End Sub
Share
Tweet
Pin
Share
No comments


Subject : Programming in Java
Aim to provide a good understanding of Object-Oriented concepts in Java, exception handling and GUI programming. it apply object-oriented programming concepts in Java in problem solving.
question :
by click the button change the image



import javax.swing.*;
import java.awt.event.*;
import java.awt.*;
GridLayout, FlowLayout public class may2009 extends JFrame implements ActionListener {
    JButton bt1, bt2, bt3;
    JLabel lb;
    ImageIcon[] image = {
        new ImageIcon("build/classes/elephant.jpg"),
        new ImageIcon("build/classes/mickey.jpg"),
        new ImageIcon("build/classes/butterfly.jpg")
    };
    public static void main(String[] args) {
        may2009 f = new may2009();
        f.setSize(700, 500);
        f.setVisible(true);
        f.setTitle("Button and Icons");
        f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    }
    public may2009() {
        bt1 = new JButton("Elephant");
        bt2 = new JButton("Mickey");
        bt3 = new JButton("Butterfly");
        lb = new JLabel();
        JPanel p1 = new JPanel();
        p1.add(lb);
        JPanel p2 = new JPanel();
        p2.add(bt1);
        p2.add(bt2);
        p2.add(bt3);
        setLayout(new BorderLayout());
        add(p1, BorderLayout.NORTH);
        add(p2, BorderLayout.SOUTH);
        bt1.addActionListener(this);
        bt2.addActionListener(this);
        bt3.addActionListener(this);
    }
    public void actionPerformed(ActionEvent e) {
        if (e.getSource() == bt1) {
            lb.setIcon(image[0]);
        }
        if (e.getSource() == bt2) {
            lb.setIcon(image[1]);
        }
        if (e.getSource() == bt3) {
            lb.setIcon(image[2]);
        }
    }
} 

insert the amount of RM select the currency, automatic display the amount.




import javax.swing.*; //all button
import java.awt.event.*; //handling event
import java.awt.*; // layout GridLayout, FlowLayout
import java.text.DecimalFormat;
public class sept2012Q2 extends JFrame implements ItemListener {
    JLabel lb1, lb2, lb3;
    JTextField tf;
    JRadioButton rd1, rd2;
    ImageIcon icon1, icon2, icon3;

    public static void main(String[] args) {
        sept2012Q2 f = new sept2012Q2();
        f.setSize(500, 200);
        f.setVisible(true);
        f.setTitle("Currency Exchange Rates");
        f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    }

    public sept2012Q2() {
            icon1 = new ImageIcon("build/classes/Malaysia.png");

            lb1 = new JLabel("Amount in Ringgit Malaysia (MYR)", icon1, JLabel.LEFT);
            lb2 = new JLabel("Choose the exchange rate");
            lb3 = new JLabel("the amount in______");
            rd1 = new JRadioButton("Singapora Dollar(1 SGD):2.42");
            rd2 = new JRadioButton("Indonesian Rupiah(1 IDR):0.00033");

            tf = new JTextField(5);
            tf.setHorizontalAlignment(JTextField.RIGHT);

            JPanel p1 = new JPanel();
            p1.add(lb1);
            p1.add(tf);
            p1.add(lb2);

            p1.setLayout(new GridLayout(2, 2));
            JPanel p2 = new JPanel();
            p2.add(rd1);
            p2.add(rd2);
            p2.setLayout(new GridLayout(1, 2));
            JPanel p3 = new JPanel();
            p3.add(lb3);
            p3.setBackground(Color.yellow);

            ButtonGroup bg = new ButtonGroup(); //choose one radio
            bg.add(rd1);
            bg.add(rd2);

            setLayout(new BorderLayout());
            add(p1, BorderLayout.NORTH);
            add(p2, BorderLayout.CENTER);
            add(p3, BorderLayout.SOUTH);

            rd1.addItemListener(this);
            rd2.addItemListener(this);

        } //constructor
    public void itemStateChanged(ItemEvent e) {
        icon2 = new ImageIcon("build/classes/Indonesia.png");
        icon3 = new ImageIcon("build/classes/Singapore.png");
        DecimalFormat df1 = new DecimalFormat("0.00");
        double rate = 0;
        String text = "";
        double rm = Double.parseDouble(tf.getText());
        if (rd1.isSelected()) {
            rate = 2.42;
            text = "SGD";
            lb3.setIcon(icon3);
        }
        if (rd2.isSelected()) {
            rate = 0.00033;
            text = "IDR";
            lb3.setIcon(icon2);
        }
        double answer = rm / rate;
        lb3.setText("The amount in" + text + " is $" + df1.format(answer));
    }
}
 
Share
Tweet
Pin
Share
No comments
Newer Posts
Older Posts

About me



Jack is a programmer, hiker who loves to take challages. Programming can be hard, but no pain no gain. Beside that, Jack like to use cooking for stress relief. “Cooking is a great destresser because it serves as a creative outlet”. During cooking the chef have to well handle of food ingredients. “Cooking is like giving birth because you are mixing things together to create something new and wonderful.”

Labels

Backpacking Camping car Caving Code Test and Project Degree Life Diploma Life Event FYP Hiking Mountain Internship MMU Cyberjaya MMU Melaka Outdoor Adventure Part Time and Work Penang Singapora Thailand Trip and Travel

recent posts

Follow Us

Blog Archive

  • ►  2018 (2)
    • ►  May (1)
    • ►  January (1)
  • ►  2017 (8)
    • ►  August (2)
    • ►  July (1)
    • ►  May (1)
    • ►  April (1)
    • ►  March (1)
    • ►  February (1)
    • ►  January (1)
  • ►  2016 (22)
    • ►  December (3)
    • ►  November (1)
    • ►  October (2)
    • ►  September (3)
    • ►  July (1)
    • ►  May (2)
    • ►  April (6)
    • ►  March (2)
    • ►  February (1)
    • ►  January (1)
  • ►  2015 (3)
    • ►  December (1)
    • ►  September (2)
  • ▼  2014 (19)
    • ►  October (1)
    • ►  September (2)
    • ►  July (4)
    • ►  June (5)
    • ►  April (2)
    • ►  March (3)
    • ▼  January (2)
      • VB Assignment Clinic Appointment
      • Coding Java Assignment
  • ►  2013 (10)
    • ►  December (2)
    • ►  November (1)
    • ►  October (1)
    • ►  September (1)
    • ►  August (3)
    • ►  June (2)
  • ►  2012 (4)
    • ►  September (1)
    • ►  June (2)
    • ►  February (1)
  • ►  2011 (2)
    • ►  December (1)
    • ►  August (1)
Powered by Blogger.