cash register extends jframe

cash register gui problem

Page 1 of 1

3 Replies - 7537 Views - Last Post: 12 March 2008 - 05:07 AM Rate Topic: -----

#1 theonethatyourwaiting   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 06-March 08

cash register extends jframe

Posted 11 March 2008 - 03:36 AM

here's my code can someone edit this to help me do my project?
all i need is to create a java program that displays a cash register window and the transaction that is done is written in the notepad thanks

i need your reply because i need this project to be pass before monday

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class Sample extends JFrame{
	private JLabel l1,l2,l3,l4,l5,l6;
	private JTextField t1,t2;
	private JButton b1,b2,b3,b4;
	private JComboBox cb1,cb2;
	public String[] wa = {""};
	public String[] ba = {""};
	public Sample(){
		super ("Cash");
		Container el = getContentPane();
		el.setLayout(null);
		setSize(300,350);
		l1 = new JLabel("Qty");
		l2 = new JLabel("Extra");
		t1 = new JTextField();
		t2 = new JTextField();
		b1 = new JButton("Compute");
		b2 = new JButton("Start");
		b3 = new JButton("End");
		b4 = new JButton("Cancel");
		l3 = new JLabel("Menu");
		l5 = new JLabel("Payment");
		l6 = new JLabel();
		cb1 = new JComboBox(wa);
		cb2 = new JComboBox(ba);
		el.add(l1);
		el.add(l2);
		el.add(t1);
		el.add(b1);
		el.add(l3);
		el.add(cb1);
		el.add(cb2);
		el.add(t2);
		el.add(b2);
		el.add(b3);
		el.add(b4);
		el.add(l5);
		el.add(l6);
		b2.setBounds(20,20,90,30);
		b3.setBounds(20,60,90,30);
		l3.setBounds(20,150,90,30);
		l1.setBounds(200,150,90,30);
		cb1.setBounds(20,180,90,30);
		l2.setBounds(20,240,90,30);
		cb2.setBounds(20,270,90,30);
		b1.setBounds(120,20,90,30);
		b4.setBounds(120,60,90,30);
		t1.setBounds(200,180,90,30);
		l5.setBounds(200,240,90,30);
		t2.setBounds(200,270,90,30);
		show();
	}
   public static void main(String[] args){
		Sample s = new Sample();
	}
}


This post has been edited by theonethatyourwaiting: 11 March 2008 - 04:05 AM


Is This A Good Question/Topic? 0
  • +

Replies To: cash register extends jframe

#2 1lacca   User is offline

  • code.rascal
  • member icon

Reputation: 44
  • View blog
  • Posts: 3,822
  • Joined: 11-August 05

Re: cash register extends jframe

Posted 11 March 2008 - 03:56 AM

Please post your code between code tags: :code:
Also, when you start a topic, try to give it a meaningful title, so others can find it easily (writing only "help me" is a bit vague).
Other than that, welcome to dic, and I hope someone will be able to help you!
Was This Post Helpful? 0
  • +
  • -

#3 theonethatyourwaiting   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 06-March 08

Re: cash register extends jframe

Posted 11 March 2008 - 04:03 AM

View Post1lacca, on 11 Mar, 2008 - 03:56 AM, said:

Please post your code between code tags: :code:
Also, when you start a topic, try to give it a meaningful title, so others can find it easily (writing only "help me" is a bit vague).
Other than that, welcome to dic, and I hope someone will be able to help you!



thank you for your hospitality just wanted some help to do my project because its so hard for me to do this thing
Was This Post Helpful? 0
  • +
  • -

#4 theonethatyourwaiting   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 06-March 08

Re: cash register extends jframe

Posted 12 March 2008 - 05:07 AM

why some of the members here are snob

Quote

here's my code can someone edit this to help me do my project?all i need is to create a java program that displays a cash register window and the transaction that is done is written in the notepad thanksi need your reply because i need this project to be pass before monday

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1