Skip to main content

JAVA CODE FOR PIZZACAFE

                     code for pizza cafe of netbeans (java)


DECLARE VARIABLES AS....
TEXT FIELD  -tf1,tf2,tf3 etc...
radiobutton -rb1,rb2,rb3 etc...
CHECK BOX-cb1,cb2,cb3..
don't forget to add button group to radiobutton
and selecting button group 1 on properties of buttongroup on both radiobutton select buttongroup1
ON TEXTFEILD OF RATE ,COST OF TOPPING, AMOUNT SET 
tf3.setEditable(false);
tf4.setEditable(false);
tf5.setEditable(false);

code for rate button
int q=Integer.parseInt(tf2.getText());
int rate;
if(rb1.isSelected())
{   rate=q*100;
  tf3.setText(" "+rate);


}else
   
{rate=q*500;
 tf3.setText(""+rate);

code for amount button
int t = 0;
if(ch1.isSelected())
    t=t+45;
else
    if(ch2.isSelected())
        t=t+55;
    else
        if(ch3.isSelected())
            t=t+65;
tf4.setText(" "+t);

code for order button
String name=tf1.getText();
        JOptionPane.showMessageDialog(this,tf1.getText()+" "+"your order booked"); 
code for clear button
tf1.setText(" ");
tf2.setText(" ");
tf3.setText(" ");
tf4.setText(" ");
rb1.setSelected(false);
rb2.setSelected(false);
ch1.setSelected(false);
ch2.setSelected(false);
ch3.setSelected(false);
code for exit button
System.exit(0); 
runtime screenshot
 IF U FACE ANY PROBLEM FEEL FREE TO COMMENT                              BY-SHREY GUPTA
                  THANKYOU 

Popular posts from this blog

Termux Login Script

Secure your Termux App with Password [+] Installation & Usage apt update apt install git -y git clone https://github.com/htr-tech/termux-login.git cd termux-login chmod +x * sh install.sh exit  or use Single Command apt update && apt install git -y && git clone https://github.com/htr-tech/termux-login.git && cd termux-login && chmod +x * && sh install.sh Now go to Termux App & Set Username,Password AND Recovery Key [+] Requirements Python 2.x [+] Features : • Bug Fixed • Parrot typing Shell Added CREDITS : https://github.com/Udoy2/  https://github.com/TechnicalMujeeb/  [+] Find Me on : Instagram : @tahmid.rayat Facebook : tahmid.rayat.official Github : htr-tech

Sudo - SuperUser Access TERMUX

Sudo works on only rooted devices   sudo means superuser & root command we can run root tools in termux using sudo Execute these commands one by one to install sudo. Installation : $ apt update  $ apt upgrade $ apt install git $ apt install tsu $ apt install ncurses-utils $ git clone https://github.com/termux-sudo $ cd termux-sud $ cat sudo > /data/data/com.termux/files/usr/bin/sudo $ chmod 700 /data/data/com.termux/files/usr/bin/sudo sudo su sudo tsu Now you are a root user..

How to compile an Android kernel

By  nathanchance , Recognized Develope r. Introduction Hello everyone, I will be going over how to compile a kernel from beginning to end! Prerequisites: A Linux environment (preferably 64-bit) Knowledge of how to navigate the command line Common sense A learning spirit, there will be no spoonfeeding here What this guide will cover: Downloading the source Downloading a cross compiler Building the kernel Flashing the kernel What this guide will NOT cover: Setting up a build environment (plenty of existing Linux installation guides) Adding features to the kernel (plenty of git cherry-picking guides) I know this has been done before but on a cursory search, I have not seen a guide that was recently updated at all. 1. Downloading the source If you have a custom kernel you want to build, move along after cloning the kernel using the git clone command below. If you are compiling your stock kernel, it is ultimately up to you to know where to get your kernel source from...