Project 6
Project 6
RAJGANGPUR, SUNDARGARH
SESSION 2024-25
APROJECTON
____
Submitted By
ADITI BADAIK
CLASS: XII, A
ROLLNO:11
ADITI BADAIK
CLASS-XII, A
ROLLNO: 11
CONTENTS
SL Topics Page
No. number
1 Introduction 1
2 Objective & Scope of the Project 2
3 Theoretical Background 3 to 4
4 System Implementation 5
5 System Design & Development 6 to13
6 User Manual 14 to16
7 References 17
1. Introduction
In this project, we have developed a Simple Calculator App
using Java with the help of NetBeans IDE. The goal of the
application is to perform basic string manipulation
method charAt() it also deals with error
handling by implementing IF ELSE decession
making. This simple program serves as a great
beginner project for understanding
fundamental programming concepts regarding
string manipulation,
The project demonstrates how Java can be used to create
interactive applications that allow users to input values,
perform calculations, and view the results instantly. By
utilizing NetBeans IDE, we leverage its powerful tools for
GUI development, allowing us to design a clean and intuitive
user interface This application accepts a String
and an integer as input, fetches a character
lies in that location and displays it as
output.
This project is intended to enhance understanding of Java
syntax, GUI components such as buttons, text fields, and
labels, as well as basic control flow mechanisms for
processing arithmetic operations. Furthermore, it provides a
solid foundation for building more advanced Java applications
in the future.
Page| 1
2. Objective & Scope of the Project
Scope
1. Core Features:
This application accepts a String and an integer as input,
fetches a character lies in that location and displays it as
output.
2. Design and Usability:
User-friendly interface suitable for all age groups.
Display of current input, operation and result in a
clear and readable manner.
3. Platform:
Desktop application.
Offline functionality.
Objective
1. Efficiency: Provide a quick and reliable tool for
performing everyday calculations.
2. Accessibility: Make arithmetic calculations easy for non-
technical users.
3. Education: Help students and learners understand and
perform simple math operations.
4. Convenience: Offer an always-available alternative to
physical calculators.
Page| 2
3. Theoretical Background
3.1WhatisNetBeansIDE?
NetBeans is an open-source integrated development environment
(IDE) used primarily for developing Java applications, though it also
supports other languages such as C, C++, PHP, HTML, JavaScript,
and more. It provides a rich set of tools for developers to write, debug,
and optimize code efficiently.
Page| 3
Supports tools like Maven, Ant, and Gradle for build and dependency
management.
7. Version Control:
Built-in support for Git, Subversion(SVN), and Mercurial.
8. Cross-Platform:
Available for Windows, mac OS, and Linux.
9. Extensibility:
Allows installation of plugins to extend its capabilities.
Uses of NetBeans
It is used for Development of desktop, web, and mobile applications.
Learning and teaching programming concepts (common in academic
environments). Building enterprise applications using Java EE.
History and Current Status
It is originally developed by Sun Microsystems, later acquired by
Oracle. Currently it is maintained by the Apache Software Foundation
as part of the Apache Incubator program. Latest versions are branded
as Apache NetBeans.
Page| 4
4. System Implementation
Hardware Requirements:
Computer with at least2GB of RAM, 1.0GHzCPU.
Keyboard and mouse for user input.
Display screen for showing the application interface.
Java-compatible OS(Windows, mac OS, Linux).
Software Requirements:
Java Development Kit(JDK)(version8 or above).
NetBeans IDE for codingand UI design.
Java Swing for the GUI
Page| 5
5. System Design & Development
Coding
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to
change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/GUIForms/JFrame.java to edit this
template
*/
/**
*
* @author admin4
*/
public class NewJFrame6 extends javax.swing.JFrame {
/**
* Creates new form NewJFrame6
*/
public NewJFrame6() {
initComponents();
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
jLabel1.setText("Enter a sentence");
jTextField1.setText("jTextField1");
jButton1.setText("Find");
jButton1.addActionListener(new java.awt.event.ActionListener() {
Page| 6
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(32, 32, 32)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)
.addComponent(jLabel2,
javax.swing.GroupLayout.DEFAULT_SIZE, 204, Short.MAX_VALUE)
.addComponent(jLabel1,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE))
.addGap(18, 18, 18)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)
.addComponent(jTextField1,
javax.swing.GroupLayout.DEFAULT_SIZE, 335, Short.MAX_VALUE)
.addComponent(jTextField2)))
.addGroup(layout.createSequentialGroup()
.addGap(224, 224, 224)
.addComponent(jButton1,
javax.swing.GroupLayout.PREFERRED_SIZE, 153,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addGap(174, 174, 174)
.addComponent(jLabel3,
javax.swing.GroupLayout.PREFERRED_SIZE, 315,
javax.swing.GroupLayout.PREFERRED_SIZE)))
.addContainerGap(101, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(50, 50, 50)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)
.addComponent(jTextField1,
javax.swing.GroupLayout.DEFAULT_SIZE, 52, Short.MAX_VALUE)
.addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGap(18, 18, 18)
Page| 7
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE,
39, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jTextField2,
javax.swing.GroupLayout.PREFERRED_SIZE, 53,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(34, 34, 34)
.addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 39,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 29,
Short.MAX_VALUE)
.addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 39,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(70, 70, 70))
);
pack();
}// </editor-fold>
/*if loc is nether 0 nor negative nor within the string length then it must exceed
Page| 8
string length thus invalid location*/
else
{
jLabel3.setText("Invalid entry ! ! Plz try again");
}
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code
(optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the
default look and feel.
* For details see
http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info :
javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(NewJFrame6.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(NewJFrame6.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(NewJFrame6.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(NewJFrame6.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
}
//</editor-fold>
Page| 9
// Variables declaration - do not modify
private javax.swing.JButton jButton1;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JTextField jTextField1;
private javax.swing.JTextField jTextField2;
// End of variables declaration
}
Page| 10
RESULT
Page| 11
Testing with first set of inputs
Page| 12
Testing with another set of inpouts.
Page| 13
6. User Manual
Installing NetBeans
1. Download NetBeans:
Go to the official Apache NetBeans website.
Download the installer for your operating system
(Windows, macOS, or Linux).
2. Install Java Development Kit (JDK) (Required for Java
Development):
Ensure you have the JDK installed. You can download it
from the Oracle website or use Open JDK.
After installation, set the JAVA_HOM Environment variable to
point to the JDK installation directory.
3. Install NetBeans:
Run the downloaded installer.
Follow the on-screen instructions to complete the
installation process.
Page| 14
During installation, ensure it detects your JDK.
4. Launch NetBeans:
After installation, open NetBeans from your desktop or
applications menu.
Using NetBeans
1. Create a New Project:
Click File > NewProject.
Select the type of project (e.g., "Java with Maven"
or "Java Application").
Click Next, enter project details (name, location),
and finish.
2. Write Code:
Once the project is created, open the Main.java file
or the main class file.
Write your code in the editor. It provides features
like syntax highlighting, auto-completion, and
suggestions.
3. Run Your Project:
Click the Run button (green triangle) in the toolbar,
or press Shift + F6.
The output will be displayed in the Output window
at the bottom.
4. Debug Your Code:
Use the Debug button (green triangle with a bug
icon) to start debugging.
Add breakpoints by clicking on the line number in
the editor.
Page| 15
Inspect variables and step through the code in the
Debugger panel.
5. Manage Libraries and Dependencies:
For Java projects, you can manage libraries via
Project Properties > Libraries.
Use Maven or Gradle for dependency management
(build tools are integrated into NetBeans).
Page| 16
7. References
Page| 17
ODISHA ADARSHA VIDYALAYA
RAJGANGPUR, SUNDARGARH
SESSION 2024-25
APROJECTON
____
Submitted By
SHITAL EKKA
CLASS: XII, A
ROLLNO:2
Page| 1
CERTIFICATE
This is to certify that name of class XII has successfully
completed Project on Getting Any Character From
string under the guidance of Computer Science
Teacher Mr. Manas Ranjan Nayak during the Year
2024-25.
Page| 2
ACKNOWLEDGEMENT
SHITAL EKKA
CLASS-XII, A
ROLLNO: 2
Page| 3
CONTENTS
SL Topics Page
No. number
1 Introduction 1
2 Objective & Scope of the Project 2
3 Theoretical Background 3 to 4
4 System Implementation 5
5 System Design & Development 6 to13
6 User Manual 14 to16
7 References 17
Page| 4
1. Introduction
In this project, we have developed a Simple Calculator App
using Java with the help of NetBeans IDE. The goal of the
application is to perform basic string manipulation
method charAt() it also deals with error
handling by implementing IF ELSE decession
making. This simple program serves as a great
beginner project for understanding
fundamental programming concepts regarding
string manipulation,
The project demonstrates how Java can be used to create
interactive applications that allow users to input values,
perform calculations, and view the results instantly. By
utilizing NetBeans IDE, we leverage its powerful tools for
GUI development, allowing us to design a clean and intuitive
user interface This application accepts a String
and an integer as input, fetches a character
lies in that location and displays it as
output.
This project is intended to enhance understanding of Java
syntax, GUI components such as buttons, text fields, and
labels, as well as basic control flow mechanisms for
processing arithmetic operations. Furthermore, it provides a
solid foundation for building more advanced Java applications
in the future.
Page| 1
2. Objective & Scope of the Project
Scope
4. Core Features:
This application accepts a String and an integer as input,
fetches a character lies in that location and displays it as
output.
5. Design and Usability:
User-friendly interface suitable for all age groups.
Display of current input, operation and result in a
clear and readable manner.
6. Platform:
Desktop application.
Offline functionality.
Objective
5. Efficiency: Provide a quick and reliable tool for
performing everyday calculations.
6. Accessibility: Make arithmetic calculations easy for non-
technical users.
7. Education: Help students and learners understand and
perform simple math operations.
8. Convenience: Offer an always-available alternative to
physical calculators.
Page| 2
3. Theoretical Background
3.1WhatisNetBeansIDE?
NetBeans is an open-source integrated development environment
(IDE) used primarily for developing Java applications, though it also
supports other languages such as C, C++, PHP, HTML, JavaScript,
and more. It provides a rich set of tools for developers to write, debug,
and optimize code efficiently.
Page| 3
Supports tools like Maven, Ant, and Gradle for build and dependency
management.
16. Version Control:
Built-in support for Git, Subversion(SVN), and Mercurial.
17. Cross-Platform:
Available for Windows, mac OS, and Linux.
18. Extensibility:
Allows installation of plugins to extend its capabilities.
Uses of NetBeans
It is used for Development of desktop, web, and mobile applications.
Learning and teaching programming concepts (common in academic
environments). Building enterprise applications using Java EE.
History and Current Status
It is originally developed by Sun Microsystems, later acquired by
Oracle. Currently it is maintained by the Apache Software Foundation
as part of the Apache Incubator program. Latest versions are branded
as Apache NetBeans.
Page| 4
4. System Implementation
Hardware Requirements:
Computer with at least2GB of RAM, 1.0GHzCPU.
Keyboard and mouse for user input.
Display screen for showing the application interface.
Java-compatible OS(Windows, mac OS, Linux).
Software Requirements:
Java Development Kit(JDK)(version8 or above).
NetBeans IDE for codingand UI design.
Java Swing for the GUI
Page| 5
5. System Design & Development
Coding
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to
change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/GUIForms/JFrame.java to edit this
template
*/
/**
*
* @author admin4
*/
public class NewJFrame6 extends javax.swing.JFrame {
/**
* Creates new form NewJFrame6
*/
public NewJFrame6() {
initComponents();
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
jLabel1.setText("Enter a sentence");
jTextField1.setText("jTextField1");
jButton1.setText("Find");
jButton1.addActionListener(new java.awt.event.ActionListener() {
Page| 6
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(32, 32, 32)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)
.addComponent(jLabel2,
javax.swing.GroupLayout.DEFAULT_SIZE, 204, Short.MAX_VALUE)
.addComponent(jLabel1,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE))
.addGap(18, 18, 18)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)
.addComponent(jTextField1,
javax.swing.GroupLayout.DEFAULT_SIZE, 335, Short.MAX_VALUE)
.addComponent(jTextField2)))
.addGroup(layout.createSequentialGroup()
.addGap(224, 224, 224)
.addComponent(jButton1,
javax.swing.GroupLayout.PREFERRED_SIZE, 153,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addGap(174, 174, 174)
.addComponent(jLabel3,
javax.swing.GroupLayout.PREFERRED_SIZE, 315,
javax.swing.GroupLayout.PREFERRED_SIZE)))
.addContainerGap(101, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(50, 50, 50)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)
.addComponent(jTextField1,
javax.swing.GroupLayout.DEFAULT_SIZE, 52, Short.MAX_VALUE)
.addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGap(18, 18, 18)
Page| 7
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE,
39, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jTextField2,
javax.swing.GroupLayout.PREFERRED_SIZE, 53,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(34, 34, 34)
.addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 39,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 29,
Short.MAX_VALUE)
.addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 39,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(70, 70, 70))
);
pack();
}// </editor-fold>
/*if loc is nether 0 nor negative nor within the string length then it must exceed
Page| 8
string length thus invalid location*/
else
{
jLabel3.setText("Invalid entry ! ! Plz try again");
}
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code
(optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the
default look and feel.
* For details see
http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info :
javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(NewJFrame6.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(NewJFrame6.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(NewJFrame6.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(NewJFrame6.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
}
//</editor-fold>
Page| 9
// Variables declaration - do not modify
private javax.swing.JButton jButton1;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JTextField jTextField1;
private javax.swing.JTextField jTextField2;
// End of variables declaration
}
Page| 10
RESULT
Page| 11
Testing with first set of inputs
Page| 12
Testing with another set of inpouts.
Page| 13
6. User Manual
Installing NetBeans
5. Download NetBeans:
Go to the official Apache NetBeans website.
Download the installer for your operating system
(Windows, macOS, or Linux).
6. Install Java Development Kit (JDK) (Required for Java
Development):
Ensure you have the JDK installed. You can download it
from the Oracle website or use Open JDK.
After installation, set the JAVA_HOM Environment variable to
point to the JDK installation directory.
7. Install NetBeans:
Run the downloaded installer.
Follow the on-screen instructions to complete the
installation process.
Page| 14
During installation, ensure it detects your JDK.
8. Launch NetBeans:
After installation, open NetBeans from your desktop or
applications menu.
Using NetBeans
6. Create a New Project:
Click File > NewProject.
Select the type of project (e.g., "Java with Maven"
or "Java Application").
Click Next, enter project details (name, location),
and finish.
7. Write Code:
Once the project is created, open the Main.java file
or the main class file.
Write your code in the editor. It provides features
like syntax highlighting, auto-completion, and
suggestions.
8. Run Your Project:
Click the Run button (green triangle) in the toolbar,
or press Shift + F6.
The output will be displayed in the Output window
at the bottom.
9. Debug Your Code:
Use the Debug button (green triangle with a bug
icon) to start debugging.
Add breakpoints by clicking on the line number in
the editor.
Page| 15
Inspect variables and step through the code in the
Debugger panel.
10. Manage Libraries and Dependencies:
For Java projects, you can manage libraries via
Project Properties > Libraries.
Use Maven or Gradle for dependency management
(build tools are integrated into NetBeans).
Page| 16
7. References
Page| 17
ODISHA ADARSHA VIDYALAYA
RAJGANGPUR, SUNDARGARH
SESSION 2024-25
APROJECTON
____
Submitted By
TANUJA MINZ
CLASS: XII, A
ROLLNO:7
Page| 1
CERTIFICATE
This is to certify that name of class XII has successfully
completed Project on Getting Any Character From
string under the guidance of Computer Science
Teacher Mr. Manas Ranjan Nayak during the Year
2024-25.
Page| 2
ACKNOWLEDGEMENT
TANUJA MINZ
CLASS-XII, A
ROLLNO: 7
Page| 3
CONTENTS
SL Topics Page
No. number
1 Introduction 1
2 Objective & Scope of the Project 2
3 Theoretical Background 3 to 4
4 System Implementation 5
5 System Design & Development 6 to13
6 User Manual 14 to16
7 References 17
Page| 4
1. Introduction
In this project, we have developed a Simple Calculator App
using Java with the help of NetBeans IDE. The goal of the
application is to perform basic string manipulation
method charAt() it also deals with error
handling by implementing IF ELSE decession
making. This simple program serves as a great
beginner project for understanding
fundamental programming concepts regarding
string manipulation,
The project demonstrates how Java can be used to create
interactive applications that allow users to input values,
perform calculations, and view the results instantly. By
utilizing NetBeans IDE, we leverage its powerful tools for
GUI development, allowing us to design a clean and intuitive
user interface This application accepts a String
and an integer as input, fetches a character
lies in that location and displays it as
output.
This project is intended to enhance understanding of Java
syntax, GUI components such as buttons, text fields, and
labels, as well as basic control flow mechanisms for
processing arithmetic operations. Furthermore, it provides a
solid foundation for building more advanced Java applications
in the future.
Page| 1
2. Objective & Scope of the Project
Scope
7. Core Features:
This application accepts a String and an integer as input,
fetches a character lies in that location and displays it as
output.
8. Design and Usability:
User-friendly interface suitable for all age groups.
Display of current input, operation and result in a
clear and readable manner.
9. Platform:
Desktop application.
Offline functionality.
Objective
9. Efficiency: Provide a quick and reliable tool for
performing everyday calculations.
10. Accessibility: Make arithmetic calculations easy for
non- technical users.
11. Education: Help students and learners understand and
perform simple math operations.
12. Convenience: Offer an always-available alternative
to physical calculators.
Page| 2
3. Theoretical Background
3.1WhatisNetBeansIDE?
NetBeans is an open-source integrated development environment
(IDE) used primarily for developing Java applications, though it also
supports other languages such as C, C++, PHP, HTML, JavaScript,
and more. It provides a rich set of tools for developers to write, debug,
and optimize code efficiently.
Page| 3
Supports tools like Maven, Ant, and Gradle for build and dependency
management.
25. Version Control:
Built-in support for Git, Subversion(SVN), and Mercurial.
26. Cross-Platform:
Available for Windows, mac OS, and Linux.
27. Extensibility:
Allows installation of plugins to extend its capabilities.
Uses of NetBeans
It is used for Development of desktop, web, and mobile applications.
Learning and teaching programming concepts (common in academic
environments). Building enterprise applications using Java EE.
History and Current Status
It is originally developed by Sun Microsystems, later acquired by
Oracle. Currently it is maintained by the Apache Software Foundation
as part of the Apache Incubator program. Latest versions are branded
as Apache NetBeans.
Page| 4
4. System Implementation
Hardware Requirements:
Computer with at least2GB of RAM, 1.0GHzCPU.
Keyboard and mouse for user input.
Display screen for showing the application interface.
Java-compatible OS(Windows, mac OS, Linux).
Software Requirements:
Java Development Kit(JDK)(version8 or above).
NetBeans IDE for codingand UI design.
Java Swing for the GUI
Page| 5
5. System Design & Development
Coding
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to
change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/GUIForms/JFrame.java to edit this
template
*/
/**
*
* @author admin4
*/
public class NewJFrame6 extends javax.swing.JFrame {
/**
* Creates new form NewJFrame6
*/
public NewJFrame6() {
initComponents();
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
jLabel1.setText("Enter a sentence");
jTextField1.setText("jTextField1");
jButton1.setText("Find");
jButton1.addActionListener(new java.awt.event.ActionListener() {
Page| 6
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(32, 32, 32)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)
.addComponent(jLabel2,
javax.swing.GroupLayout.DEFAULT_SIZE, 204, Short.MAX_VALUE)
.addComponent(jLabel1,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE))
.addGap(18, 18, 18)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)
.addComponent(jTextField1,
javax.swing.GroupLayout.DEFAULT_SIZE, 335, Short.MAX_VALUE)
.addComponent(jTextField2)))
.addGroup(layout.createSequentialGroup()
.addGap(224, 224, 224)
.addComponent(jButton1,
javax.swing.GroupLayout.PREFERRED_SIZE, 153,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addGap(174, 174, 174)
.addComponent(jLabel3,
javax.swing.GroupLayout.PREFERRED_SIZE, 315,
javax.swing.GroupLayout.PREFERRED_SIZE)))
.addContainerGap(101, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(50, 50, 50)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)
.addComponent(jTextField1,
javax.swing.GroupLayout.DEFAULT_SIZE, 52, Short.MAX_VALUE)
.addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGap(18, 18, 18)
Page| 7
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE,
39, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jTextField2,
javax.swing.GroupLayout.PREFERRED_SIZE, 53,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(34, 34, 34)
.addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 39,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 29,
Short.MAX_VALUE)
.addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 39,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(70, 70, 70))
);
pack();
}// </editor-fold>
/*if loc is nether 0 nor negative nor within the string length then it must exceed
Page| 8
string length thus invalid location*/
else
{
jLabel3.setText("Invalid entry ! ! Plz try again");
}
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code
(optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the
default look and feel.
* For details see
http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info :
javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(NewJFrame6.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(NewJFrame6.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(NewJFrame6.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(NewJFrame6.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
}
//</editor-fold>
Page| 9
// Variables declaration - do not modify
private javax.swing.JButton jButton1;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JTextField jTextField1;
private javax.swing.JTextField jTextField2;
// End of variables declaration
}
Page| 10
RESULT
Page| 11
Testing with first set of inputs
Page| 12
Testing with another set of inpouts.
Page| 13
6. User Manual
Installing NetBeans
9. Download NetBeans:
Go to the official Apache NetBeans website.
Download the installer for your operating system
(Windows, macOS, or Linux).
10. Install Java Development Kit (JDK) (Required for
Java Development):
Ensure you have the JDK installed. You can download it
from the Oracle website or use Open JDK.
After installation, set the JAVA_HOM Environment variable to
point to the JDK installation directory.
11. Install NetBeans:
Run the downloaded installer.
Follow the on-screen instructions to complete the
installation process.
Page| 14
During installation, ensure it detects your JDK.
12. Launch NetBeans:
After installation, open NetBeans from your desktop or
applications menu.
Using NetBeans
11. Create a New Project:
Click File > NewProject.
Select the type of project (e.g., "Java with Maven"
or "Java Application").
Click Next, enter project details (name, location),
and finish.
12. Write Code:
Once the project is created, open the Main.java file
or the main class file.
Write your code in the editor. It provides features
like syntax highlighting, auto-completion, and
suggestions.
13. Run Your Project:
Click the Run button (green triangle) in the toolbar,
or press Shift + F6.
The output will be displayed in the Output window
at the bottom.
14. Debug Your Code:
Use the Debug button (green triangle with a bug
icon) to start debugging.
Add breakpoints by clicking on the line number in
the editor.
Page| 15
Inspect variables and step through the code in the
Debugger panel.
15. Manage Libraries and Dependencies:
For Java projects, you can manage libraries via
Project Properties > Libraries.
Use Maven or Gradle for dependency management
(build tools are integrated into NetBeans).
Page| 16
7. References
Page| 17
ODISHA ADARSHA VIDYALAYA
RAJGANGPUR, SUNDARGARH
SESSION 2024-25
APROJECTON
____
Submitted By
SHALINI BAG
CLASS: XII, A
ROLLNO:35
Page| 1
CERTIFICATE
This is to certify that name of class XII has successfully
completed Project on Getting Any Character From
string under the guidance of Computer Science
Teacher Mr. Manas Ranjan Nayak during the Year
2024-25.
Page| 2
ACKNOWLEDGEMENT
SHALINI BAG
CLASS-XII, A
ROLLNO: 35
Page| 3
CONTENTS
SL Topics Page
No. number
1 Introduction 1
2 Objective & Scope of the Project 2
3 Theoretical Background 3 to 4
4 System Implementation 5
5 System Design & Development 6 to13
6 User Manual 14 to16
7 References 17
Page| 4
1. Introduction
In this project, we have developed a Simple Calculator App
using Java with the help of NetBeans IDE. The goal of the
application is to perform basic string manipulation
method charAt() it also deals with error
handling by implementing IF ELSE decession
making. This simple program serves as a great
beginner project for understanding
fundamental programming concepts regarding
string manipulation,
The project demonstrates how Java can be used to create
interactive applications that allow users to input values,
perform calculations, and view the results instantly. By
utilizing NetBeans IDE, we leverage its powerful tools for
GUI development, allowing us to design a clean and intuitive
user interface This application accepts a String
and an integer as input, fetches a character
lies in that location and displays it as
output.
This project is intended to enhance understanding of Java
syntax, GUI components such as buttons, text fields, and
labels, as well as basic control flow mechanisms for
processing arithmetic operations. Furthermore, it provides a
solid foundation for building more advanced Java applications
in the future.
Page| 1
2. Objective & Scope of the Project
Scope
10. Core Features:
This application accepts a String and an integer as input,
fetches a character lies in that location and displays it as
output.
11. Design and Usability:
User-friendly interface suitable for all age groups.
Display of current input, operation and result in a
clear and readable manner.
12. Platform:
Desktop application.
Offline functionality.
Objective
13. Efficiency: Provide a quick
and reliable tool for performing
everyday calculations.
14. Accessibility: Make arithmetic calculations easy for
non- technical users.
15. Education: Help students and learners understand and
perform simple math operations.
16. Convenience: Offer an always-available alternative
to physical calculators.
Page| 2
3. Theoretical Background
3.1WhatisNetBeansIDE?
NetBeans is an open-source integrated development environment
(IDE) used primarily for developing Java applications, though it also
supports other languages such as C, C++, PHP, HTML, JavaScript,
and more. It provides a rich set of tools for developers to write, debug,
and optimize code efficiently.
Page| 3
Supports tools like Maven, Ant, and Gradle for build and dependency
management.
34. Version Control:
Built-in support for Git, Subversion(SVN), and Mercurial.
35. Cross-Platform:
Available for Windows, mac OS, and Linux.
36. Extensibility:
Allows installation of plugins to extend its capabilities.
Uses of NetBeans
It is used for Development of desktop, web, and mobile applications.
Learning and teaching programming concepts (common in academic
environments). Building enterprise applications using Java EE.
History and Current Status
It is originally developed by Sun Microsystems, later acquired by
Oracle. Currently it is maintained by the Apache Software Foundation
as part of the Apache Incubator program. Latest versions are branded
as Apache NetBeans.
Page| 4
4. System Implementation
Hardware Requirements:
Computer with at least2GB of RAM, 1.0GHzCPU.
Keyboard and mouse for user input.
Display screen for showing the application interface.
Java-compatible OS(Windows, mac OS, Linux).
Software Requirements:
Java Development Kit(JDK)(version8 or above).
NetBeans IDE for codingand UI design.
Java Swing for the GUI
Page| 5
5. System Design & Development
Coding
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to
change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/GUIForms/JFrame.java to edit this
template
*/
/**
*
* @author admin4
*/
public class NewJFrame6 extends javax.swing.JFrame {
/**
* Creates new form NewJFrame6
*/
public NewJFrame6() {
initComponents();
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
jLabel1.setText("Enter a sentence");
jTextField1.setText("jTextField1");
jButton1.setText("Find");
jButton1.addActionListener(new java.awt.event.ActionListener() {
Page| 6
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(32, 32, 32)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)
.addComponent(jLabel2,
javax.swing.GroupLayout.DEFAULT_SIZE, 204, Short.MAX_VALUE)
.addComponent(jLabel1,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE))
.addGap(18, 18, 18)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)
.addComponent(jTextField1,
javax.swing.GroupLayout.DEFAULT_SIZE, 335, Short.MAX_VALUE)
.addComponent(jTextField2)))
.addGroup(layout.createSequentialGroup()
.addGap(224, 224, 224)
.addComponent(jButton1,
javax.swing.GroupLayout.PREFERRED_SIZE, 153,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addGap(174, 174, 174)
.addComponent(jLabel3,
javax.swing.GroupLayout.PREFERRED_SIZE, 315,
javax.swing.GroupLayout.PREFERRED_SIZE)))
.addContainerGap(101, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(50, 50, 50)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)
.addComponent(jTextField1,
javax.swing.GroupLayout.DEFAULT_SIZE, 52, Short.MAX_VALUE)
.addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGap(18, 18, 18)
Page| 7
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE,
39, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jTextField2,
javax.swing.GroupLayout.PREFERRED_SIZE, 53,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(34, 34, 34)
.addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 39,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 29,
Short.MAX_VALUE)
.addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 39,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(70, 70, 70))
);
pack();
}// </editor-fold>
/*if loc is nether 0 nor negative nor within the string length then it must exceed
Page| 8
string length thus invalid location*/
else
{
jLabel3.setText("Invalid entry ! ! Plz try again");
}
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code
(optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the
default look and feel.
* For details see
http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info :
javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(NewJFrame6.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(NewJFrame6.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(NewJFrame6.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(NewJFrame6.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
}
//</editor-fold>
Page| 9
// Variables declaration - do not modify
private javax.swing.JButton jButton1;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JTextField jTextField1;
private javax.swing.JTextField jTextField2;
// End of variables declaration
}
Page| 10
RESULT
Page| 11
Testing with first set of inputs
Page| 12
Testing with another set of inpouts.
Page| 13
6. User Manual
Installing NetBeans
13. Download NetBeans:
Go to the official Apache NetBeans website.
Download the installer for your operating system
(Windows, macOS, or Linux).
14. Install Java Development Kit (JDK) (Required for
Java Development):
Ensure you have the JDK installed. You can download it
from the Oracle website or use Open JDK.
After installation, set the JAVA_HOM Environment variable to
point to the JDK installation directory.
15. Install NetBeans:
Run the downloaded installer.
Follow the on-screen instructions to complete the
installation process.
Page| 14
During installation, ensure it detects your JDK.
16. Launch NetBeans:
After installation, open NetBeans from your desktop or
applications menu.
Using NetBeans
16. Create a New Project:
Click File > NewProject.
Select the type of project (e.g., "Java with Maven"
or "Java Application").
Click Next, enter project details (name, location),
and finish.
17. Write Code:
Once the project is created, open the Main.java file
or the main class file.
Write your code in the editor. It provides features
like syntax highlighting, auto-completion, and
suggestions.
18. Run Your Project:
Click the Run button (green triangle) in the toolbar,
or press Shift + F6.
The output will be displayed in the Output window
at the bottom.
19. Debug Your Code:
Use the Debug button (green triangle with a bug
icon) to start debugging.
Add breakpoints by clicking on the line number in
the editor.
Page| 15
Inspect variables and step through the code in the
Debugger panel.
20. Manage Libraries and Dependencies:
For Java projects, you can manage libraries via
Project Properties > Libraries.
Use Maven or Gradle for dependency management
(build tools are integrated into NetBeans).
Page| 16
7. References
Page| 17
ODISHA ADARSHA VIDYALAYA
RAJGANGPUR, SUNDARGARH
SESSION 2024-25
APROJECTON
____
Submitted By
MONICA MINZ
CLASS: XII, B
ROLLNO:2
Page| 1
CERTIFICATE
This is to certify that name of class XII has successfully
completed Project on Getting Any Character From
string under the guidance of Computer Science
Teacher Mr. Manas Ranjan Nayak during the Year
2024-25.
Page| 2
ACKNOWLEDGEMENT
MONICA MINZ
CLASS-XII, B
ROLLNO: 2
Page| 3
CONTENTS
SL Topics Page
No. number
1 Introduction 1
2 Objective & Scope of the Project 2
3 Theoretical Background 3 to 4
4 System Implementation 5
5 System Design & Development 6 to13
6 User Manual 14 to16
7 References 17
Page| 4
1. Introduction
In this project, we have developed a Simple Calculator App
using Java with the help of NetBeans IDE. The goal of the
application is to perform basic string manipulation
method charAt() it also deals with error
handling by implementing IF ELSE decession
making. This simple program serves as a great
beginner project for understanding
fundamental programming concepts regarding
string manipulation,
The project demonstrates how Java can be used to create
interactive applications that allow users to input values,
perform calculations, and view the results instantly. By
utilizing NetBeans IDE, we leverage its powerful tools for
GUI development, allowing us to design a clean and intuitive
user interface This application accepts a String
and an integer as input, fetches a character
lies in that location and displays it as
output.
This project is intended to enhance understanding of Java
syntax, GUI components such as buttons, text fields, and
labels, as well as basic control flow mechanisms for
processing arithmetic operations. Furthermore, it provides a
solid foundation for building more advanced Java applications
in the future.
Page| 1
2. Objective & Scope of the Project
Scope
13. Core Features:
This application accepts a String and an integer as input,
fetches a character lies in that location and displays it as
output.
14. Design and Usability:
User-friendly interface suitable for all age groups.
Display of current input, operation and result in a
clear and readable manner.
15. Platform:
Desktop application.
Offline functionality.
Objective
17. Efficiency: Provide a quick
and reliable tool for performing
everyday calculations.
18. Accessibility: Make arithmetic calculations easy for
non- technical users.
19. Education: Help students and learners understand and
perform simple math operations.
20. Convenience: Offer an always-available alternative
to physical calculators.
Page| 2
3. Theoretical Background
3.1WhatisNetBeansIDE?
NetBeans is an open-source integrated development environment
(IDE) used primarily for developing Java applications, though it also
supports other languages such as C, C++, PHP, HTML, JavaScript,
and more. It provides a rich set of tools for developers to write, debug,
and optimize code efficiently.
Page| 3
Supports tools like Maven, Ant, and Gradle for build and dependency
management.
43. Version Control:
Built-in support for Git, Subversion(SVN), and Mercurial.
44. Cross-Platform:
Available for Windows, mac OS, and Linux.
45. Extensibility:
Allows installation of plugins to extend its capabilities.
Uses of NetBeans
It is used for Development of desktop, web, and mobile applications.
Learning and teaching programming concepts (common in academic
environments). Building enterprise applications using Java EE.
History and Current Status
It is originally developed by Sun Microsystems, later acquired by
Oracle. Currently it is maintained by the Apache Software Foundation
as part of the Apache Incubator program. Latest versions are branded
as Apache NetBeans.
Page| 4
4. System Implementation
Hardware Requirements:
Computer with at least2GB of RAM, 1.0GHzCPU.
Keyboard and mouse for user input.
Display screen for showing the application interface.
Java-compatible OS(Windows, mac OS, Linux).
Software Requirements:
Java Development Kit(JDK)(version8 or above).
NetBeans IDE for codingand UI design.
Java Swing for the GUI
Page| 5
5. System Design & Development
Coding
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to
change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/GUIForms/JFrame.java to edit this
template
*/
/**
*
* @author admin4
*/
public class NewJFrame6 extends javax.swing.JFrame {
/**
* Creates new form NewJFrame6
*/
public NewJFrame6() {
initComponents();
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
jLabel1.setText("Enter a sentence");
jTextField1.setText("jTextField1");
jButton1.setText("Find");
jButton1.addActionListener(new java.awt.event.ActionListener() {
Page| 6
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(32, 32, 32)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)
.addComponent(jLabel2,
javax.swing.GroupLayout.DEFAULT_SIZE, 204, Short.MAX_VALUE)
.addComponent(jLabel1,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE))
.addGap(18, 18, 18)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)
.addComponent(jTextField1,
javax.swing.GroupLayout.DEFAULT_SIZE, 335, Short.MAX_VALUE)
.addComponent(jTextField2)))
.addGroup(layout.createSequentialGroup()
.addGap(224, 224, 224)
.addComponent(jButton1,
javax.swing.GroupLayout.PREFERRED_SIZE, 153,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addGap(174, 174, 174)
.addComponent(jLabel3,
javax.swing.GroupLayout.PREFERRED_SIZE, 315,
javax.swing.GroupLayout.PREFERRED_SIZE)))
.addContainerGap(101, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(50, 50, 50)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)
.addComponent(jTextField1,
javax.swing.GroupLayout.DEFAULT_SIZE, 52, Short.MAX_VALUE)
.addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGap(18, 18, 18)
Page| 7
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE,
39, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jTextField2,
javax.swing.GroupLayout.PREFERRED_SIZE, 53,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(34, 34, 34)
.addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 39,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 29,
Short.MAX_VALUE)
.addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 39,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(70, 70, 70))
);
pack();
}// </editor-fold>
/*if loc is nether 0 nor negative nor within the string length then it must exceed
Page| 8
string length thus invalid location*/
else
{
jLabel3.setText("Invalid entry ! ! Plz try again");
}
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code
(optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the
default look and feel.
* For details see
http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info :
javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(NewJFrame6.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(NewJFrame6.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(NewJFrame6.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(NewJFrame6.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
}
//</editor-fold>
Page| 9
// Variables declaration - do not modify
private javax.swing.JButton jButton1;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JTextField jTextField1;
private javax.swing.JTextField jTextField2;
// End of variables declaration
}
Page| 10
RESULT
Page| 11
Testing with first set of inputs
Page| 12
Testing with another set of inpouts.
Page| 13
6. User Manual
Installing NetBeans
17. Download NetBeans:
Go to the official Apache NetBeans website.
Download the installer for your operating system
(Windows, macOS, or Linux).
18. Install Java Development Kit (JDK) (Required for
Java Development):
Ensure you have the JDK installed. You can download it
from the Oracle website or use Open JDK.
After installation, set the JAVA_HOM Environment variable to
point to the JDK installation directory.
19. Install NetBeans:
Run the downloaded installer.
Follow the on-screen instructions to complete the
installation process.
Page| 14
During installation, ensure it detects your JDK.
20. Launch NetBeans:
After installation, open NetBeans from your desktop or
applications menu.
Using NetBeans
21. Create a New Project:
Click File > NewProject.
Select the type of project (e.g., "Java with Maven"
or "Java Application").
Click Next, enter project details (name, location),
and finish.
22. Write Code:
Once the project is created, open the Main.java file
or the main class file.
Write your code in the editor. It provides features
like syntax highlighting, auto-completion, and
suggestions.
23. Run Your Project:
Click the Run button (green triangle) in the toolbar,
or press Shift + F6.
The output will be displayed in the Output window
at the bottom.
24. Debug Your Code:
Use the Debug button (green triangle with a bug
icon) to start debugging.
Add breakpoints by clicking on the line number in
the editor.
Page| 15
Inspect variables and step through the code in the
Debugger panel.
25. Manage Libraries and Dependencies:
For Java projects, you can manage libraries via
Project Properties > Libraries.
Use Maven or Gradle for dependency management
(build tools are integrated into NetBeans).
Page| 16
7. References
Page| 17
ODISHA ADARSHA VIDYALAYA
RAJGANGPUR, SUNDARGARH
SESSION 2024-25
APROJECTON
____
Submitted By
SANJANA MINZ
CLASS: XII, B
ROLLNO:7
Page| 1
CERTIFICATE
This is to certify that name of class XII has successfully
completed Project on Getting Any Character From
string under the guidance of Computer Science
Teacher Mr. Manas Ranjan Nayak during the Year
2024-25.
Page| 2
ACKNOWLEDGEMENT
SANJANA MINZ
CLASS-XII, B
ROLLNO: 7
Page| 3
CONTENTS
SL Topics Page
No. number
1 Introduction 1
2 Objective & Scope of the Project 2
3 Theoretical Background 3 to 4
4 System Implementation 5
5 System Design & Development 6 to13
6 User Manual 14 to16
7 References 17
Page| 4
1. Introduction
In this project, we have developed a Simple Calculator App
using Java with the help of NetBeans IDE. The goal of the
application is to perform basic string manipulation
method charAt() it also deals with error
handling by implementing IF ELSE decession
making. This simple program serves as a great
beginner project for understanding
fundamental programming concepts regarding
string manipulation,
The project demonstrates how Java can be used to create
interactive applications that allow users to input values,
perform calculations, and view the results instantly. By
utilizing NetBeans IDE, we leverage its powerful tools for
GUI development, allowing us to design a clean and intuitive
user interface This application accepts a String
and an integer as input, fetches a character
lies in that location and displays it as
output.
This project is intended to enhance understanding of Java
syntax, GUI components such as buttons, text fields, and
labels, as well as basic control flow mechanisms for
processing arithmetic operations. Furthermore, it provides a
solid foundation for building more advanced Java applications
in the future.
Page| 1
2. Objective & Scope of the Project
Scope
16. Core Features:
This application accepts a String and an integer as input,
fetches a character lies in that location and displays it as
output.
17. Design and Usability:
User-friendly interface suitable for all age groups.
Display of current input, operation and result in a
clear and readable manner.
18. Platform:
Desktop application.
Offline functionality.
Objective
21. Efficiency: Provide a quick
and reliable tool for performing
everyday calculations.
22. Accessibility: Make arithmetic calculations easy for
non- technical users.
23. Education: Help students and learners understand and
perform simple math operations.
24. Convenience: Offer an always-available alternative
to physical calculators.
Page| 2
3. Theoretical Background
3.1WhatisNetBeansIDE?
NetBeans is an open-source integrated development environment
(IDE) used primarily for developing Java applications, though it also
supports other languages such as C, C++, PHP, HTML, JavaScript,
and more. It provides a rich set of tools for developers to write, debug,
and optimize code efficiently.
Page| 3
Supports tools like Maven, Ant, and Gradle for build and dependency
management.
52. Version Control:
Built-in support for Git, Subversion(SVN), and Mercurial.
53. Cross-Platform:
Available for Windows, mac OS, and Linux.
54. Extensibility:
Allows installation of plugins to extend its capabilities.
Uses of NetBeans
It is used for Development of desktop, web, and mobile applications.
Learning and teaching programming concepts (common in academic
environments). Building enterprise applications using Java EE.
History and Current Status
It is originally developed by Sun Microsystems, later acquired by
Oracle. Currently it is maintained by the Apache Software Foundation
as part of the Apache Incubator program. Latest versions are branded
as Apache NetBeans.
Page| 4
4. System Implementation
Hardware Requirements:
Computer with at least2GB of RAM, 1.0GHzCPU.
Keyboard and mouse for user input.
Display screen for showing the application interface.
Java-compatible OS(Windows, mac OS, Linux).
Software Requirements:
Java Development Kit(JDK)(version8 or above).
NetBeans IDE for codingand UI design.
Java Swing for the GUI
Page| 5
5. System Design & Development
Coding
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to
change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/GUIForms/JFrame.java to edit this
template
*/
/**
*
* @author admin4
*/
public class NewJFrame6 extends javax.swing.JFrame {
/**
* Creates new form NewJFrame6
*/
public NewJFrame6() {
initComponents();
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
jLabel1.setText("Enter a sentence");
jTextField1.setText("jTextField1");
jButton1.setText("Find");
jButton1.addActionListener(new java.awt.event.ActionListener() {
Page| 6
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(32, 32, 32)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)
.addComponent(jLabel2,
javax.swing.GroupLayout.DEFAULT_SIZE, 204, Short.MAX_VALUE)
.addComponent(jLabel1,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE))
.addGap(18, 18, 18)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)
.addComponent(jTextField1,
javax.swing.GroupLayout.DEFAULT_SIZE, 335, Short.MAX_VALUE)
.addComponent(jTextField2)))
.addGroup(layout.createSequentialGroup()
.addGap(224, 224, 224)
.addComponent(jButton1,
javax.swing.GroupLayout.PREFERRED_SIZE, 153,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addGap(174, 174, 174)
.addComponent(jLabel3,
javax.swing.GroupLayout.PREFERRED_SIZE, 315,
javax.swing.GroupLayout.PREFERRED_SIZE)))
.addContainerGap(101, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(50, 50, 50)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)
.addComponent(jTextField1,
javax.swing.GroupLayout.DEFAULT_SIZE, 52, Short.MAX_VALUE)
.addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGap(18, 18, 18)
Page| 7
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE,
39, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jTextField2,
javax.swing.GroupLayout.PREFERRED_SIZE, 53,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(34, 34, 34)
.addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 39,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 29,
Short.MAX_VALUE)
.addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 39,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(70, 70, 70))
);
pack();
}// </editor-fold>
/*if loc is nether 0 nor negative nor within the string length then it must exceed
Page| 8
string length thus invalid location*/
else
{
jLabel3.setText("Invalid entry ! ! Plz try again");
}
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code
(optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the
default look and feel.
* For details see
http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info :
javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(NewJFrame6.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(NewJFrame6.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(NewJFrame6.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(NewJFrame6.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
}
//</editor-fold>
Page| 9
// Variables declaration - do not modify
private javax.swing.JButton jButton1;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JTextField jTextField1;
private javax.swing.JTextField jTextField2;
// End of variables declaration
}
Page| 10
RESULT
Page| 11
Testing with first set of inputs
Page| 12
Testing with another set of inpouts.
Page| 13
6. User Manual
Installing NetBeans
21. Download NetBeans:
Go to the official Apache NetBeans website.
Download the installer for your operating system
(Windows, macOS, or Linux).
22. Install Java Development Kit (JDK) (Required for
Java Development):
Ensure you have the JDK installed. You can download it
from the Oracle website or use Open JDK.
After installation, set the JAVA_HOM Environment variable to
point to the JDK installation directory.
23. Install NetBeans:
Run the downloaded installer.
Follow the on-screen instructions to complete the
installation process.
Page| 14
During installation, ensure it detects your JDK.
24. Launch NetBeans:
After installation, open NetBeans from your desktop or
applications menu.
Using NetBeans
26. Create a New Project:
Click File > NewProject.
Select the type of project (e.g., "Java with Maven"
or "Java Application").
Click Next, enter project details (name, location),
and finish.
27. Write Code:
Once the project is created, open the Main.java file
or the main class file.
Write your code in the editor. It provides features
like syntax highlighting, auto-completion, and
suggestions.
28. Run Your Project:
Click the Run button (green triangle) in the toolbar,
or press Shift + F6.
The output will be displayed in the Output window
at the bottom.
29. Debug Your Code:
Use the Debug button (green triangle with a bug
icon) to start debugging.
Add breakpoints by clicking on the line number in
the editor.
Page| 15
Inspect variables and step through the code in the
Debugger panel.
30. Manage Libraries and Dependencies:
For Java projects, you can manage libraries via
Project Properties > Libraries.
Use Maven or Gradle for dependency management
(build tools are integrated into NetBeans).
Page| 16
7. References
Page| 17
ODISHA ADARSHA VIDYALAYA
RAJGANGPUR, SUNDARGARH
SESSION 2024-25
APROJECTON
____
Submitted By
NILIMA KUJUR
CLASS: XII, B
ROLLNO:20
Page| 1
CERTIFICATE
This is to certify that name of class XII has successfully
completed Project on Getting Any Character From
string under the guidance of Computer Science
Teacher Mr. Manas Ranjan Nayak during the Year
2024-25.
Page| 2
ACKNOWLEDGEMENT
NILIMA KUJUR
CLASS-XII, B
ROLLNO: 20
Page| 3
CONTENTS
SL Topics Page
No. number
1 Introduction 1
2 Objective & Scope of the Project 2
3 Theoretical Background 3 to 4
4 System Implementation 5
5 System Design & Development 6 to13
6 User Manual 14 to16
7 References 17
Page| 4
1. Introduction
In this project, we have developed a Simple Calculator App
using Java with the help of NetBeans IDE. The goal of the
application is to perform basic string manipulation
method charAt() it also deals with error
handling by implementing IF ELSE decession
making. This simple program serves as a great
beginner project for understanding
fundamental programming concepts regarding
string manipulation,
The project demonstrates how Java can be used to create
interactive applications that allow users to input values,
perform calculations, and view the results instantly. By
utilizing NetBeans IDE, we leverage its powerful tools for
GUI development, allowing us to design a clean and intuitive
user interface This application accepts a String
and an integer as input, fetches a character
lies in that location and displays it as
output.
This project is intended to enhance understanding of Java
syntax, GUI components such as buttons, text fields, and
labels, as well as basic control flow mechanisms for
processing arithmetic operations. Furthermore, it provides a
solid foundation for building more advanced Java applications
in the future.
Page| 1
2. Objective & Scope of the Project
Scope
19. Core Features:
This application accepts a String and an integer as input,
fetches a character lies in that location and displays it as
output.
20. Design and Usability:
User-friendly interface suitable for all age groups.
Display of current input, operation and result in a
clear and readable manner.
21. Platform:
Desktop application.
Offline functionality.
Objective
25. Efficiency: Provide a quick
and reliable tool for performing
everyday calculations.
26. Accessibility: Make arithmetic calculations easy for
non- technical users.
27. Education: Help students and learners understand and
perform simple math operations.
28. Convenience: Offer an always-available alternative
to physical calculators.
Page| 2
3. Theoretical Background
3.1WhatisNetBeansIDE?
NetBeans is an open-source integrated development environment
(IDE) used primarily for developing Java applications, though it also
supports other languages such as C, C++, PHP, HTML, JavaScript,
and more. It provides a rich set of tools for developers to write, debug,
and optimize code efficiently.
Page| 3
Supports tools like Maven, Ant, and Gradle for build and dependency
management.
61. Version Control:
Built-in support for Git, Subversion(SVN), and Mercurial.
62. Cross-Platform:
Available for Windows, mac OS, and Linux.
63. Extensibility:
Allows installation of plugins to extend its capabilities.
Uses of NetBeans
It is used for Development of desktop, web, and mobile applications.
Learning and teaching programming concepts (common in academic
environments). Building enterprise applications using Java EE.
History and Current Status
It is originally developed by Sun Microsystems, later acquired by
Oracle. Currently it is maintained by the Apache Software Foundation
as part of the Apache Incubator program. Latest versions are branded
as Apache NetBeans.
Page| 4
4. System Implementation
Hardware Requirements:
Computer with at least2GB of RAM, 1.0GHzCPU.
Keyboard and mouse for user input.
Display screen for showing the application interface.
Java-compatible OS(Windows, mac OS, Linux).
Software Requirements:
Java Development Kit(JDK)(version8 or above).
NetBeans IDE for codingand UI design.
Java Swing for the GUI
Page| 5
5. System Design & Development
Coding
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to
change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/GUIForms/JFrame.java to edit this
template
*/
/**
*
* @author admin4
*/
public class NewJFrame6 extends javax.swing.JFrame {
/**
* Creates new form NewJFrame6
*/
public NewJFrame6() {
initComponents();
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
jLabel1.setText("Enter a sentence");
jTextField1.setText("jTextField1");
jButton1.setText("Find");
jButton1.addActionListener(new java.awt.event.ActionListener() {
Page| 6
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(32, 32, 32)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)
.addComponent(jLabel2,
javax.swing.GroupLayout.DEFAULT_SIZE, 204, Short.MAX_VALUE)
.addComponent(jLabel1,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE))
.addGap(18, 18, 18)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)
.addComponent(jTextField1,
javax.swing.GroupLayout.DEFAULT_SIZE, 335, Short.MAX_VALUE)
.addComponent(jTextField2)))
.addGroup(layout.createSequentialGroup()
.addGap(224, 224, 224)
.addComponent(jButton1,
javax.swing.GroupLayout.PREFERRED_SIZE, 153,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addGap(174, 174, 174)
.addComponent(jLabel3,
javax.swing.GroupLayout.PREFERRED_SIZE, 315,
javax.swing.GroupLayout.PREFERRED_SIZE)))
.addContainerGap(101, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(50, 50, 50)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)
.addComponent(jTextField1,
javax.swing.GroupLayout.DEFAULT_SIZE, 52, Short.MAX_VALUE)
.addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGap(18, 18, 18)
Page| 7
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE,
39, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jTextField2,
javax.swing.GroupLayout.PREFERRED_SIZE, 53,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(34, 34, 34)
.addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 39,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 29,
Short.MAX_VALUE)
.addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 39,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(70, 70, 70))
);
pack();
}// </editor-fold>
/*if loc is nether 0 nor negative nor within the string length then it must exceed
Page| 8
string length thus invalid location*/
else
{
jLabel3.setText("Invalid entry ! ! Plz try again");
}
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code
(optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the
default look and feel.
* For details see
http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info :
javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(NewJFrame6.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(NewJFrame6.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(NewJFrame6.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(NewJFrame6.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
}
//</editor-fold>
Page| 9
// Variables declaration - do not modify
private javax.swing.JButton jButton1;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JTextField jTextField1;
private javax.swing.JTextField jTextField2;
// End of variables declaration
}
Page| 10
RESULT
Page| 11
Testing with first set of inputs
Page| 12
Testing with another set of inpouts.
Page| 13
6. User Manual
Installing NetBeans
25. Download NetBeans:
Go to the official Apache NetBeans website.
Download the installer for your operating system
(Windows, macOS, or Linux).
26. Install Java Development Kit (JDK) (Required for
Java Development):
Ensure you have the JDK installed. You can download it
from the Oracle website or use Open JDK.
After installation, set the JAVA_HOM Environment variable to
point to the JDK installation directory.
27. Install NetBeans:
Run the downloaded installer.
Follow the on-screen instructions to complete the
installation process.
Page| 14
During installation, ensure it detects your JDK.
28. Launch NetBeans:
After installation, open NetBeans from your desktop or
applications menu.
Using NetBeans
31. Create a New Project:
Click File > NewProject.
Select the type of project (e.g., "Java with Maven"
or "Java Application").
Click Next, enter project details (name, location),
and finish.
32. Write Code:
Once the project is created, open the Main.java file
or the main class file.
Write your code in the editor. It provides features
like syntax highlighting, auto-completion, and
suggestions.
33. Run Your Project:
Click the Run button (green triangle) in the toolbar,
or press Shift + F6.
The output will be displayed in the Output window
at the bottom.
34. Debug Your Code:
Use the Debug button (green triangle with a bug
icon) to start debugging.
Add breakpoints by clicking on the line number in
the editor.
Page| 15
Inspect variables and step through the code in the
Debugger panel.
35. Manage Libraries and Dependencies:
For Java projects, you can manage libraries via
Project Properties > Libraries.
Use Maven or Gradle for dependency management
(build tools are integrated into NetBeans).
Page| 16
7. References
Page| 17
ODISHA ADARSHA VIDYALAYA
RAJGANGPUR, SUNDARGARH
SESSION 2024-25
APROJECTON
____
Submitted By
JHARANA BANKRA
CLASS: XII, A
ROLLNO:23
Page| 1
CERTIFICATE
This is to certify that name of class XII has successfully
completed Project on Getting Any Character From
string under the guidance of Computer Science
Teacher Mr. Manas Ranjan Nayak during the Year
2024-25.
Page| 2
ACKNOWLEDGEMENT
JHARANA BANKRA
CLASS-XII, A
ROLLNO: 23
Page| 3
CONTENTS
SL Topics Page
No. number
1 Introduction 1
2 Objective & Scope of the Project 2
3 Theoretical Background 3 to 4
4 System Implementation 5
5 System Design & Development 6 to13
6 User Manual 14 to16
7 References 17
Page| 4
1. Introduction
In this project, we have developed a Simple Calculator App
using Java with the help of NetBeans IDE. The goal of the
application is to perform basic string manipulation
method charAt() it also deals with error
handling by implementing IF ELSE decession
making. This simple program serves as a great
beginner project for understanding
fundamental programming concepts regarding
string manipulation,
The project demonstrates how Java can be used to create
interactive applications that allow users to input values,
perform calculations, and view the results instantly. By
utilizing NetBeans IDE, we leverage its powerful tools for
GUI development, allowing us to design a clean and intuitive
user interface This application accepts a String
and an integer as input, fetches a character
lies in that location and displays it as
output.
This project is intended to enhance understanding of Java
syntax, GUI components such as buttons, text fields, and
labels, as well as basic control flow mechanisms for
processing arithmetic operations. Furthermore, it provides a
solid foundation for building more advanced Java applications
in the future.
Page| 1
2. Objective & Scope of the Project
Scope
22. Core Features:
This application accepts a String and an integer as input,
fetches a character lies in that location and displays it as
output.
23. Design and Usability:
User-friendly interface suitable for all age groups.
Display of current input, operation and result in a
clear and readable manner.
24. Platform:
Desktop application.
Offline functionality.
Objective
29. Efficiency: Provide a quick
and reliable tool for performing
everyday calculations.
30. Accessibility: Make arithmetic calculations easy for
non- technical users.
31. Education: Help students and learners understand and
perform simple math operations.
32. Convenience: Offer an always-available alternative
to physical calculators.
Page| 2
3. Theoretical Background
3.1WhatisNetBeansIDE?
NetBeans is an open-source integrated development environment
(IDE) used primarily for developing Java applications, though it also
supports other languages such as C, C++, PHP, HTML, JavaScript,
and more. It provides a rich set of tools for developers to write, debug,
and optimize code efficiently.
Page| 3
Supports tools like Maven, Ant, and Gradle for build and dependency
management.
70. Version Control:
Built-in support for Git, Subversion(SVN), and Mercurial.
71. Cross-Platform:
Available for Windows, mac OS, and Linux.
72. Extensibility:
Allows installation of plugins to extend its capabilities.
Uses of NetBeans
It is used for Development of desktop, web, and mobile applications.
Learning and teaching programming concepts (common in academic
environments). Building enterprise applications using Java EE.
History and Current Status
It is originally developed by Sun Microsystems, later acquired by
Oracle. Currently it is maintained by the Apache Software Foundation
as part of the Apache Incubator program. Latest versions are branded
as Apache NetBeans.
Page| 4
4. System Implementation
Hardware Requirements:
Computer with at least2GB of RAM, 1.0GHzCPU.
Keyboard and mouse for user input.
Display screen for showing the application interface.
Java-compatible OS(Windows, mac OS, Linux).
Software Requirements:
Java Development Kit(JDK)(version8 or above).
NetBeans IDE for codingand UI design.
Java Swing for the GUI
Page| 5
5. System Design & Development
Coding
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to
change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/GUIForms/JFrame.java to edit this
template
*/
/**
*
* @author admin4
*/
public class NewJFrame6 extends javax.swing.JFrame {
/**
* Creates new form NewJFrame6
*/
public NewJFrame6() {
initComponents();
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
jLabel1.setText("Enter a sentence");
jTextField1.setText("jTextField1");
jButton1.setText("Find");
jButton1.addActionListener(new java.awt.event.ActionListener() {
Page| 6
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(32, 32, 32)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)
.addComponent(jLabel2,
javax.swing.GroupLayout.DEFAULT_SIZE, 204, Short.MAX_VALUE)
.addComponent(jLabel1,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE))
.addGap(18, 18, 18)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)
.addComponent(jTextField1,
javax.swing.GroupLayout.DEFAULT_SIZE, 335, Short.MAX_VALUE)
.addComponent(jTextField2)))
.addGroup(layout.createSequentialGroup()
.addGap(224, 224, 224)
.addComponent(jButton1,
javax.swing.GroupLayout.PREFERRED_SIZE, 153,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addGap(174, 174, 174)
.addComponent(jLabel3,
javax.swing.GroupLayout.PREFERRED_SIZE, 315,
javax.swing.GroupLayout.PREFERRED_SIZE)))
.addContainerGap(101, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(50, 50, 50)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)
.addComponent(jTextField1,
javax.swing.GroupLayout.DEFAULT_SIZE, 52, Short.MAX_VALUE)
.addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGap(18, 18, 18)
Page| 7
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE,
39, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jTextField2,
javax.swing.GroupLayout.PREFERRED_SIZE, 53,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(34, 34, 34)
.addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 39,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 29,
Short.MAX_VALUE)
.addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 39,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(70, 70, 70))
);
pack();
}// </editor-fold>
/*if loc is nether 0 nor negative nor within the string length then it must exceed
Page| 8
string length thus invalid location*/
else
{
jLabel3.setText("Invalid entry ! ! Plz try again");
}
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code
(optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the
default look and feel.
* For details see
http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info :
javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(NewJFrame6.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(NewJFrame6.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(NewJFrame6.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(NewJFrame6.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
}
//</editor-fold>
Page| 9
// Variables declaration - do not modify
private javax.swing.JButton jButton1;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JTextField jTextField1;
private javax.swing.JTextField jTextField2;
// End of variables declaration
}
Page| 10
RESULT
Page| 11
Testing with first set of inputs
Page| 12
Testing with another set of inpouts.
Page| 13
6. User Manual
Installing NetBeans
29. Download NetBeans:
Go to the official Apache NetBeans website.
Download the installer for your operating system
(Windows, macOS, or Linux).
30. Install Java Development Kit (JDK) (Required for
Java Development):
Ensure you have the JDK installed. You can download it
from the Oracle website or use Open JDK.
After installation, set the JAVA_HOM Environment variable to
point to the JDK installation directory.
31. Install NetBeans:
Run the downloaded installer.
Follow the on-screen instructions to complete the
installation process.
Page| 14
During installation, ensure it detects your JDK.
32. Launch NetBeans:
After installation, open NetBeans from your desktop or
applications menu.
Using NetBeans
36. Create a New Project:
Click File > NewProject.
Select the type of project (e.g., "Java with Maven"
or "Java Application").
Click Next, enter project details (name, location),
and finish.
37. Write Code:
Once the project is created, open the Main.java file
or the main class file.
Write your code in the editor. It provides features
like syntax highlighting, auto-completion, and
suggestions.
38. Run Your Project:
Click the Run button (green triangle) in the toolbar,
or press Shift + F6.
The output will be displayed in the Output window
at the bottom.
39. Debug Your Code:
Use the Debug button (green triangle with a bug
icon) to start debugging.
Add breakpoints by clicking on the line number in
the editor.
Page| 15
Inspect variables and step through the code in the
Debugger panel.
40. Manage Libraries and Dependencies:
For Java projects, you can manage libraries via
Project Properties > Libraries.
Use Maven or Gradle for dependency management
(build tools are integrated into NetBeans).
Page| 16
7. References
Page| 17