This document contains code for a login form and main interface for a grain management application. The login form allows users to enter credentials which are validated against hardcoded values. If valid, it opens the main interface containing buttons for various application functions. The interface is initialized by calling initComponents() which sets up the layout and UI elements.
Java 9 introduces modules to the Java programming language and its runtime. Despite this feature being optional, due to the modularization of the standard library existing applications might behave differently when running on a version 9 JVM. Furthermore, because of changes in the runtime, existing libraries and frameworks might not yet correctly process your modularized code. As a result, updating to a Java 9 VM and taking Java 9 into brings its challanges.
This talk discusses the practical implications of module boundaries and analyzes new limitations Java 9 imposes on the reflection API. This talk explains how reflection is used in popular frameworks like Spring and Hibernate and explains why existing applications might break or change their behavior when facing modularized code. Finally, this talk showcases alternatives to now failing Java programming patterns and weights their robustness with regard to the Java releases 10 and upward.
The presenter is an active contributor to open source and helped to migrate many popular Java libraries to supporting Java 9. As a consequence, he as been working with Java 9 for almost two years.
탑크리에듀교육센터(http://www.topcredu.co.kr)에서 제공하는
스프링프레임워크 & 마이바티스(Spring Framework, MyBatis)교육강좌입니다. Spring DI(Dependency Injection),세터 주입(Setter Injection) – XML 기반, 어노테이션기반 등에 대하여 설명한 교육자료이니 참고 바랍니다^^.
An overview how to realize code generation of languages on the JVM that implement other class layouts than the Java programming languages. As an example, the inline-mock-maker for Mockito is discussed which supports languages like Kotlin that make any property final by default.
Java 9 introduces modules to the Java programming language and its runtime. Despite this feature being optional, due to the modularization of the standard library existing applications might behave differently when running on a version 9 JVM. Furthermore, because of changes in the runtime, existing libraries and frameworks might not yet correctly process your modularized code. As a result, updating to a Java 9 VM and taking Java 9 into brings its challanges.
This talk discusses the practical implications of module boundaries and analyzes new limitations Java 9 imposes on the reflection API. This talk explains how reflection is used in popular frameworks like Spring and Hibernate and explains why existing applications might break or change their behavior when facing modularized code. Finally, this talk showcases alternatives to now failing Java programming patterns and weights their robustness with regard to the Java releases 10 and upward.
The presenter is an active contributor to open source and helped to migrate many popular Java libraries to supporting Java 9. As a consequence, he as been working with Java 9 for almost two years.
탑크리에듀교육센터(http://www.topcredu.co.kr)에서 제공하는
스프링프레임워크 & 마이바티스(Spring Framework, MyBatis)교육강좌입니다. Spring DI(Dependency Injection),세터 주입(Setter Injection) – XML 기반, 어노테이션기반 등에 대하여 설명한 교육자료이니 참고 바랍니다^^.
An overview how to realize code generation of languages on the JVM that implement other class layouts than the Java programming languages. As an example, the inline-mock-maker for Mockito is discussed which supports languages like Kotlin that make any property final by default.
This is the support of a course to teach mainly Redux, and Redux with React for Java and C# programmers. It is the third part of the course to recycle programmers from desktop app programming to web app programming. This course covers from history of Redux, its origin, step by step what is a reducer, and later concepts like reducer splitting, action handling, async and many more.
You also can use repositories:
- https://github.com/drpicox/learn-redux-bytesting
- https://github.com/drpicox/learn-redux-zoo-bytesting
To improve your skills.
A simple talk about appliyng patterns in Javascript.
It focuses in both jQuery and Angular.
It explains some basics MVC, cohesion and coupling.
It also have many examples of the patterns applied.
Full examples and documentation can be found here: http://david-rodenas.com/tutorial-jspatterns-v1/
탑크리에듀(http://www.topcredu.co.kr)에서 제공하는 스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)강좌입니다. Spring Ioc 실습(어노테이션기반, 인터페이스, 세터주입)에 대한 자료이니 많은 도움 되셨길 바랍니다. http://ojc.asia/ 에 들어가시면 보다 많은 자료들이 게시되어 있으니 참고바랍니다^^.
Spring Framework Petclinic sample applicationAntoine Rey
Spring Petclinic is a sample application that has been designed to show how the Spring Framework can be used to build simple but powerful database-oriented applications.
The fork named Spring Framework Petclinic maintains a version both with a plain old Spring Framework configuration and a 3-layer architecture (i.e. presentation --> service --> repository).
Ten useful JavaScript tips & best practicesAnkit Rastogi
In this presentation there are ten useful JavaScript techniques which can be included in your application easily with less friction along with some AngularJs tips and best practices as a bonus. These tips and best practices are accompanied by examples & will cover script loading, design pattern, performance optimization and other areas.
Since best practices are very subjective topics, proper benchmarking needs to be done.
탑크리에듀교육센터(www.topcredu.co.kr)제공
스프링프레임워크 & 마이바티스(Spring Framework, MyBatis)
18번째 자료입니다. 참고하시어 많은 도움되셨길 바랍니다.
교육 및 수강문의/기타문의사항은 홈페이지(www.topcredu.co.kr)를 통하여 하실 수 있습니다.^^
PHP 7 was recently released, bringing some much-desired changes and improvements to the language. However, many developers haven't had the opportunity to use it for their projects and may not be familiar with the changes it brings. We'll remedy this by checking out the new "spaceship operator," demonstrating how static type hints produce clean code, and using anonymous classes to quickly implement interfaces on the fly. Attendees will also learn about breaking changes and "gotchas" to watch out for when making the upgrade and will receive pointers on getting started with PHP 7 today.
In JS: CLASS <=> Constructor FN
new FN() => FN() { this }
FN = CLASS (FN = FN, FN = DATA)
Objects
Prototype / __proto__
Inheritence
Rewriting / Augmenting
built in objects
This is the support of a course to teach mainly Redux, and Redux with React for Java and C# programmers. It is the third part of the course to recycle programmers from desktop app programming to web app programming. This course covers from history of Redux, its origin, step by step what is a reducer, and later concepts like reducer splitting, action handling, async and many more.
You also can use repositories:
- https://github.com/drpicox/learn-redux-bytesting
- https://github.com/drpicox/learn-redux-zoo-bytesting
To improve your skills.
A simple talk about appliyng patterns in Javascript.
It focuses in both jQuery and Angular.
It explains some basics MVC, cohesion and coupling.
It also have many examples of the patterns applied.
Full examples and documentation can be found here: http://david-rodenas.com/tutorial-jspatterns-v1/
탑크리에듀(http://www.topcredu.co.kr)에서 제공하는 스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)강좌입니다. Spring Ioc 실습(어노테이션기반, 인터페이스, 세터주입)에 대한 자료이니 많은 도움 되셨길 바랍니다. http://ojc.asia/ 에 들어가시면 보다 많은 자료들이 게시되어 있으니 참고바랍니다^^.
Spring Framework Petclinic sample applicationAntoine Rey
Spring Petclinic is a sample application that has been designed to show how the Spring Framework can be used to build simple but powerful database-oriented applications.
The fork named Spring Framework Petclinic maintains a version both with a plain old Spring Framework configuration and a 3-layer architecture (i.e. presentation --> service --> repository).
Ten useful JavaScript tips & best practicesAnkit Rastogi
In this presentation there are ten useful JavaScript techniques which can be included in your application easily with less friction along with some AngularJs tips and best practices as a bonus. These tips and best practices are accompanied by examples & will cover script loading, design pattern, performance optimization and other areas.
Since best practices are very subjective topics, proper benchmarking needs to be done.
탑크리에듀교육센터(www.topcredu.co.kr)제공
스프링프레임워크 & 마이바티스(Spring Framework, MyBatis)
18번째 자료입니다. 참고하시어 많은 도움되셨길 바랍니다.
교육 및 수강문의/기타문의사항은 홈페이지(www.topcredu.co.kr)를 통하여 하실 수 있습니다.^^
PHP 7 was recently released, bringing some much-desired changes and improvements to the language. However, many developers haven't had the opportunity to use it for their projects and may not be familiar with the changes it brings. We'll remedy this by checking out the new "spaceship operator," demonstrating how static type hints produce clean code, and using anonymous classes to quickly implement interfaces on the fly. Attendees will also learn about breaking changes and "gotchas" to watch out for when making the upgrade and will receive pointers on getting started with PHP 7 today.
In JS: CLASS <=> Constructor FN
new FN() => FN() { this }
FN = CLASS (FN = FN, FN = DATA)
Objects
Prototype / __proto__
Inheritence
Rewriting / Augmenting
built in objects
Java!!!!!Create a program that authenticates username and password.pdfarvindarora20042013
Java!!!!!
Create a program that authenticates username and password. The program should have a clear
and submit button. If you click sumbit it will go to a new JFrame. The new Jframe contain a
menu button( that does nothing) and a logout button that exits the program.
Solution
import java.sql.*;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import javax.swing.*;
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author Administrator
*/
public class Login extends javax.swing.JFrame {
/**
* Creates new form Login
*/
public Login() {
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\")
//
private void initComponents() {
jLabel1 = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
jTextField1 = new javax.swing.JTextField();
jLabel3 = new javax.swing.JLabel();
jPasswordField1 = new javax.swing.JPasswordField();
jButton1 = new javax.swing.JButton();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
jLabel1.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N
jLabel1.setText(\"Hiding Data Cloud \");
jLabel2.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N
jLabel2.setText(\"User Name : \");
jLabel3.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N
jLabel3.setText(\"Password :\");
jButton1.setText(\"Login\");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(96, 96, 96)
.addComponent(jLabel1))
.addGroup(layout.createSequentialGroup()
.addGap(69, 69, 69)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addGroup(layout.createSequentialGroup()
.addComponent(jLabel2)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 134,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addComponent(jLabel3)
.addGap(18, 18, 18)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jButton1)
.addComponent(jPasswordField1))))))
.addContainerGap(112, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(35, 35, 35)
.addComponent(jLabel1)
.addGap(53, 53, 53)
.addGroup(layout.creat.
/*!
* Modernizr v2.0.6
* http://www.modernizr.com
*
* Copyright (c) 2009-2011 Faruk Ates, Paul Irish, Alex Sexton
* Dual-licensed under the BSD or MIT licenses: www.modernizr.com/license/
*/
/*
* Modernizr tests which native CSS3 and HTML5 features are available in
* the current UA and makes the results available to you in two ways:
* as properties on a global Modernizr object, and as classes on the
* element. This information allows you to progressively enhance
* your pages with a granular level of control over the experience.
*
* Modernizr has an optional (not included) conditional resource loader
* called Modernizr.load(), based on Yepnope.js (yepnopejs.com).
* To get a build that includes Modernizr.load(), as well as choosing
* which tests to include, go to www.modernizr.com/download/
*
* Authors Faruk Ates, Paul Irish, Alex Sexton,
* Contributors Ryan Seddon, Ben Alman
*/
window.Modernizr = (function( window, document, undefined ) {
var version = '2.0.6',
Modernizr = {},
// option for enabling the HTML classes to be added
enableClasses = true,
docElement = document.documentElement,
docHead = document.head || document.getElementsByTagName('head')[0],
/**
* Create our "modernizr" element that we do most feature tests on.
*/
mod = 'modernizr',
modElem = document.createElement(mod),
mStyle = modElem.style,
/**
* Create the input element for various Web Forms feature tests.
*/
inputElem = document.createElement('input'),
smile = ':)',
toString = Object.prototype.toString,
// List of property values to set for css tests. See ticket #21
prefixes = ' -webkit- -moz- -o- -ms- -khtml- '.split(' '),
// Following spec is to expose vendor-specific style properties as:
// elem.style.WebkitBorderRadius
// and the following would be incorrect:
// elem.style.webkitBorderRadius
// Webkit ghosts their properties in lowercase but Opera & Moz do not.
// Microsoft foregoes prefixes entirely elements in IE6-9 are considered 'NoScope' elements and therefore will be removed
// when injected with innerHTML. To get around this you need to prepend the 'NoScope' element
// with a 'scoped' element, in our case the soft-hyphen entity as it won't mess with our measurements.
// http://msdn.microsoft.com/en-us/library/ms533897%28VS.85%29.aspx
style = ['', ''].join('');
div.id = mod;
div.innerHTML += style;
docElement.appendChild(div);
ret = callback(div, rule);
div.parentNode.removeChild(div);
return !!ret;
},
// adapted from matchMedia polyfill
// by Scott Jehl and Paul Irish
// gist.github.com/786768
testMediaQuery = function( mq ) {
if ( window.matchMedia ) {
return matchMedia(mq).matches;
}
var bool;
injectElementWithStyles('@media ' + mq + ' { #' + mod + ' { position: absolute; } }', funct ...
JavaFX 8 est disponible depuis mars 2014 et apporte son lot de nouveautés. Gradle est en version 2 depuis juillet 2014. Deux technologies plus que prometteuses: JavaFX donne un coup de jeune au développement d’applications desktop en Java en apportant un navigateur web intégré, le support des WebSockets, de la 3D, et bien d’autres. Gradle est l’outil de d’automatisation de build à la mode, apportant de superbes possibilités par rapport rapport à maven, outil vieillissant, grâce à l’engouement de la communauté vis à vis de cet outil mais aussi par le fait de la technologie utilisée en son sein: groovy. Venez découvrir comment il est possible de réaliser rapidement une application à la mode en JavaFX avec un outil à la mode également. Bref venez à une session trendy.
case3h231/diamond.gif
case3h231/energy.jpg
case3h231/modernizr-2.js
/*!
* Modernizr v2.0.6
* http://www.modernizr.com
*
* Copyright (c) 2009-2011 Faruk Ates, Paul Irish, Alex Sexton
* Dual-licensed under the BSD or MIT licenses: www.modernizr.com/license/
*/
/*
* Modernizr tests which native CSS3 and HTML5 features are available in
* the current UA and makes the results available to you in two ways:
* as properties on a global Modernizr object, and as classes on the
* <html> element. This information allows you to progressively enhance
* your pages with a granular level of control over the experience.
*
* Modernizr has an optional (not included) conditional resource loader
* called Modernizr.load(), based on Yepnope.js (yepnopejs.com).
* To get a build that includes Modernizr.load(), as well as choosing
* which tests to include, go to www.modernizr.com/download/
*
* Authors Faruk Ates, Paul Irish, Alex Sexton,
* Contributors Ryan Seddon, Ben Alman
*/
window.Modernizr = (function( window, document, undefined ) {
var version = '2.0.6',
Modernizr = {},
// option for enabling the HTML classes to be added
enableClasses = true,
docElement = document.documentElement,
docHead = document.head || document.getElementsByTagName('head')[0],
/**
* Create our "modernizr" element that we do most feature tests on.
*/
mod = 'modernizr',
modElem = document.createElement(mod),
mStyle = modElem.style,
/**
* Create the input element for various Web Forms feature tests.
*/
inputElem = document.createElement('input'),
smile = ':)',
toString = Object.prototype.toString,
// List of property values to set for css tests. See ticket #21
prefixes = ' -webkit- -moz- -o- -ms- -khtml- '.split(' '),
// Following spec is to expose vendor-specific style properties as:
// elem.style.WebkitBorderRadius
// and the following would be incorrect:
// elem.style.webkitBorderRadius
// Webkit ghosts their properties in lowercase but Opera & Moz do not.
// Microsoft foregoes prefixes entirely <= IE8, but appears to
// use a lowercase `ms` instead of the correct `Ms` in IE9
// More here: http://github.com/Modernizr/Modernizr/issues/issue/21
domPrefixes = 'Webkit Moz O ms Khtml'.split(' '),
ns = {'svg': 'http://www.w3.org/2000/svg'},
tests = {},
inputs = {},
attrs = {},
classes = [],
featureName, // used in testing loop
// Inject element with style element and some CSS rules
injectElementWithStyles = function( rule, callback, nodes, testnames ) {
var style, ret, node,
div = document.createElement('div');
if ( parseInt(nodes, 10) ) {
// In order not to give false positives we create a node for each test
// This also allows the method to scale for unspecified uses
while ( nodes-- ) {
node = document.createElement(' ...
Othello.java
package othello;
import core.Game;
import userInterface.OthelloUi;
public class Othello {
// main is \"static\" because it\'s going to be called by the java interpreter
// before any objects are created, thus, it does not need to be in an
// instance of the Othello class to be called, it can simply be called
// whenever.
public static void main(String[] args) {
Game game = new Game();
OthelloUi othelloUi = new OthelloUi(game);
}
}
OthelloUi.java
package userInterface;
import core.Game;
import userInterface.GameUi;
import userInterface.BoardUi;
import java.awt.BorderLayout;
import java.awt.Dimension;
import javax.swing.JFrame;
public class OthelloUi extends JFrame {
private Game game;
private GameUi gameUi;
private BoardUi boardUi;
public OthelloUi(Game game) {
this.game = game;
// Create components and put them in JFrame upon class
// instantiation.
initComponents();
}
private void initComponents() {
this.setPreferredSize(new Dimension(600, 600));
this.setMinimumSize(new Dimension(600, 600));
// This is done to close the actual application once the
// UI is closed via X.
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
gameUi = new GameUi();
boardUi = new BoardUi();
// By default, JFrame uses BorderLayout as its LayoutManager,
// which is responsible for managing how UI components are placed
// within framses/panels.
this.add(gameUi, BorderLayout.NORTH);
this.add(boardUi, BorderLayout.CENTER);
this.setVisible(true);
}
}
GameUi.java
package userInterface;
import java.awt.Dimension;
import javax.swing.JLabel;
import javax.swing.JPanel;
public class GameUi extends JPanel {
public GameUi() {
// Creates components and puts them in the JPanel on
// instantiation.
initComponents();
}
private JLabel nameOne;
private JLabel nameTwo;
private JLabel scoreOne;
private JLabel scoreTwo;
private void initComponents() {
// Set dimensions for JPanel.
this.setPreferredSize(new Dimension(200, 100));
this.setMinimumSize(new Dimension(200, 100));
// Label components.
nameOne = new JLabel(\"Player One\");
nameTwo = new JLabel(\"Player Two\");
scoreOne = new JLabel(\"0\");
scoreTwo = new JLabel(\"0\");
nameOne.setMinimumSize(new Dimension(100, 50));
nameTwo.setMinimumSize(new Dimension(100, 50));
scoreOne.setMinimumSize(new Dimension(100, 50));
scoreTwo.setMinimumSize(new Dimension(100, 50));
// JPanel uses FlowLayout layout manager, which adds components
// left to right in a row, until it runs out of space and creates
// a new row.
this.add(nameOne);
this.add(scoreOne);
this.add(nameTwo);
this.add(scoreTwo);
}
}
BoardUi.java
package userInterface;
import core.Constants;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JPanel;
public class BoardUi extends JPanel {
private JButton[][] board;
private BoardListener listener;
public BoardUi() {
initComponents();
}
private voi.
Food Processing and Preservation Presentation.pptxdengejnr13
The presentation covers key areas on food processing and preservation highlighting the traditional methods and the current, modern methods applicable worldwide for both small and large scale.
Vietnam Mushroom Market Growth, Demand and Challenges of the Key Industry Pla...IMARC Group
The Vietnam mushroom market size is projected to exhibit a growth rate (CAGR) of 6.52% during 2024-2032.
More Info:- https://www.imarcgroup.com/vietnam-mushroom-market
Hotel management involves overseeing all aspects of a hotel's operations to ensure smooth functioning and exceptional guest experiences. This multifaceted role includes tasks such as managing staff, handling reservations, maintaining facilities, overseeing finances, and implementing marketing strategies to attract guests. Effective hotel management requires strong leadership, communication, organizational, and problem-solving skills to navigate the complexities of the hospitality industry and ensure guest satisfaction while maximizing profitability.
Water treatment study ,a method to purify waste water
Grain final border one
1.
2.
3. package grain;
public class login extends javax.swing.JFrame {
/**
* Creates new form login
*/
public login() {
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() {
id = new javax.swing.JPanel();
jLabel1 = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
jLabel3 = new javax.swing.JLabel();
jLabel4 = new javax.swing.JLabel();
jLabel5 = new javax.swing.JLabel();
i = new javax.swing.JTextField();
9. index obj = new index();
obj.setVisible(true);
this.hide();
}
else
{
war.setText("Invalid ID or Password !!!");
}// TODO add your handling code here:
}
/**
* @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) {
14. package grain;
/**
*
* @author Win8
*/
public class index extends javax.swing.JFrame {
/**
* Creates new form index
*/
public index() {
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() {
jPanel1 = new javax.swing.JPanel();
jLabel6 = new javax.swing.JLabel();
15. jLabel1 = new javax.swing.JLabel();
jButton1 = new javax.swing.JButton();
jButton2 = new javax.swing.JButton();
jButton3 = new javax.swing.JButton();
jButton4 = new javax.swing.JButton();
jButton5 = new javax.swing.JButton();
jButton6 = new javax.swing.JButton();
jButton7 = new javax.swing.JButton();
jButton8 = new javax.swing.JButton();
jButton9 = new javax.swing.JButton();
jButton10 = new javax.swing.JButton();
jLabel3 = new javax.swing.JLabel();
jLabel4 = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
jPanel1.setBackground(new java.awt.Color(255, 255, 255));
jLabel6.setIcon(new javax.swing.ImageIcon(getClass().getResource("/grain/toor-seeds-
250x250.jpg"))); // NOI18N
jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/grain/Kala_chana-
370x310.png"))); // NOI18N
jButton1.setFont(new java.awt.Font("Trajan Pro", 2, 24)); // NOI18N
jButton1.setText("PURCHASE");
jButton1.addActionListener(new java.awt.event.ActionListener() {
22. * @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(index.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(index.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(index.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(index.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
}
//</editor-fold>
/* Create and display the form */
27. package grain;
/**
*
* @author Win8
*/
public class Purchase extends javax.swing.JFrame {
/**
* Creates new form Purchase
*/
public Purchase() {
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() {
jPanel1 = new javax.swing.JPanel();
jLabel1 = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
28. jLabel3 = new javax.swing.JLabel();
jLabel4 = new javax.swing.JLabel();
jLabel5 = new javax.swing.JLabel();
jLabel6 = new javax.swing.JLabel();
rate = new javax.swing.JTextField();
qp = new javax.swing.JTextField();
jLabel7 = new javax.swing.JLabel();
jLabel8 = new javax.swing.JLabel();
jLabel9 = new javax.swing.JLabel();
jLabel10 = new javax.swing.JLabel();
jLabel11 = new javax.swing.JLabel();
jLabel12 = new javax.swing.JLabel();
jLabel13 = new javax.swing.JLabel();
mandi = new javax.swing.JTextField();
nirashit = new javax.swing.JTextField();
frieght = new javax.swing.JTextField();
amt = new javax.swing.JTextField();
unloading = new javax.swing.JTextField();
packing = new javax.swing.JTextField();
loading = new javax.swing.JTextField();
jLabel14 = new javax.swing.JLabel();
price = new javax.swing.JTextField();
jLabel15 = new javax.swing.JLabel();
bagscost = new javax.swing.JTextField();
jLabel16 = new javax.swing.JLabel();
jLabel17 = new javax.swing.JLabel();
bags = new javax.swing.JTextField();
42. nirashit.setText("");
bags.setText("");
bagscost.setText("");
total.setText("");
packing.setText("");
// TODO add your handling code here:
}
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
int qty = Integer.parseInt(qp.getText());
int r = Integer.parseInt(rate.getText());
int amount = qty*r;
amt.setText(""+amount);
float manditax = (amount * 2)/100 ;
mandi.setText(""+manditax);
float nirashittax = (manditax * 10)/100 ;
nirashit.setText(""+nirashittax);
int load = qty * 5;
loading.setText(""+load);
unloading.setText(""+load);
int pack = qty * 2 ;
packing.setText(""+pack);
int fr = qty * 6 ;
frieght.setText(""+fr);
int b = qty*2;
bags.setText(""+b);
float bcost = b * 16;
43. bagscost.setText(""+bcost);
float totalamt = bcost + fr + load + load + nirashittax + manditax + amount + r + qty ;
total.setText(""+totalamt);
price.setText(""+(totalamt/qty));
// TODO add your handling code here:
}
private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {
index obj = new index();
obj.setVisible(true);
this.hide();// TODO add your handling code here:
}
/**
* @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;
46. private javax.swing.JTextField qp;
private javax.swing.JTextField rate;
private javax.swing.JTextField total;
private javax.swing.JTextField unloading;
// End of variables declaration
}
47.
48.
49.
50.
51. package grain;
/**
*
* @author Win8
*/
public class Sales extends javax.swing.JFrame {
/**
* Creates new form Sales
*/
public Sales() {
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() {
jPanel1 = new javax.swing.JPanel();
jLabel1 = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
52. jLabel3 = new javax.swing.JLabel();
jLabel4 = new javax.swing.JLabel();
jLabel5 = new javax.swing.JLabel();
jLabel6 = new javax.swing.JLabel();
jLabel7 = new javax.swing.JLabel();
jLabel8 = new javax.swing.JLabel();
jLabel9 = new javax.swing.JLabel();
rate = new javax.swing.JTextField();
total = new javax.swing.JTextField();
quantity = new javax.swing.JTextField();
amt = new javax.swing.JTextField();
ins = new javax.swing.JTextField();
bags = new javax.swing.JTextField();
vat = new javax.swing.JTextField();
jLabel10 = new javax.swing.JLabel();
jLabel11 = new javax.swing.JLabel();
frieght = new javax.swing.JTextField();
jLabel12 = new javax.swing.JLabel();
load = new javax.swing.JTextField();
jLabel13 = new javax.swing.JLabel();
pack = new javax.swing.JTextField();
c = new javax.swing.JCheckBox();
jButton1 = new javax.swing.JButton();
jButton2 = new javax.swing.JButton();
jButton3 = new javax.swing.JButton();
war = new javax.swing.JLabel();
65. load.setText("");
total.setText("");
ins.setText("");
vat.setText("");
frieght.setText("");
amt.setText("");
war.setText("");// TODO add your handling code here:
}
private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {
war.setText("");
int qty = Integer.parseInt(quantity.getText());
int r = Integer.parseInt(rate.getText());
int amount = qty * r;
amt.setText(""+amount);
bags.setText(""+(qty*2));
float tax = (amount *5) / 100 ;
vat.setText(""+tax);
float in = (amount * 2) / 100 ;
ins.setText(""+in);
int l = qty * 5;
load.setText(""+l);
double pa = qty * 1.5 ;
pack.setText(""+pa);
int f = Integer.parseInt(frieght.getText());
int fc = f*qty;
frieght.setText(""+fc);
66. float gt = amount + tax + in ;
total.setText(""+gt);
if(c.isSelected()==true)
{
gt = gt+fc;
total.setText(""+gt);
war.setText("Invoice includes Frieght charges to be paid by customer to driver at time of delivery of
goods !!!");
}
// TODO add your handling code here:
}
/**
* @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;
}