Write a java program to find the route that connects between Red and Green Cells. General Rules for traversal 1. You can traverse from one cell to another vertically, horizontally or diagonally. 2. You cannot traverse through Black cells. 3. There should be only one Red and Green cell and at least one of each should be present. Otherwise the array is invalid. 4. You cannot revisit a cell that you have already traversed. 5. The maze need not be in the same as given in the above example
2617import java.awt.*; import java.awt.event.*; public class Agency extends Frame implements ActionListener { Label l1,l2,l3,l4; Button b1; TextField t1,t2; String s1,s2,s3,s4; public static void main(String args[]) { new Agency().setVisible(true); } public Agency() { super("Gas Agency Package"); setSize(1280,800); setBackground(Color.lightGray); setLayout(null); // setLayout(new BorderLayout()); t1=new TextField(20); t1.setBounds(440,150,200,30); t1.setBackground(Color.white); t2=new TextField(20); t2.setBounds(440,180,200,30); t2.setBackground(Color.white); t2.setEchoChar('*'); l1=new Label("Gas Agency Package"); l1.setBounds(400,30,300,50); l1.setFont(new Font("TimesRoman",Font.BOLD,25)); l1.setAlignment(Label.CENTER); l2=new Label("Enter your ID and Passoword"); l2.setFont(new Font("TimesRoman",Font.BOLD,20)); l2.setBounds(270,80,300,50); l3=new Label("Enter ID"); l2.setFont(new Font ("TimesRoman",Font.BOLD,20)); l3.setBounds(270,150,120,50); l4=new Label("Enter Passoword"); l2.setFont(new Font ("TimesRoman",Font.BOLD,20)); l4.setBounds(270,180,140,50); add(l1); add(l2); add(l3); add(t1); add(l4); add(t2); b1=new Button("Login"); b1.setBackground(Color.white); b1.setBounds(400,280,100,70); b1.addActionListener(this); add(b1); } public void actionPerformed(ActionEvent e) { if(e.getSource()==b1) { s3="svce"; s4="svce"; s1=t1.getText(); s2=t2.getText(); if(s1.equals(s3) && s2.equals(s4)) { //System.out.println("password is correct"); MenuForm m= new MenuForm(); m.setVisible(true); //this.dispose(); } else { System.out.println("password not correct"); } this.dispose(); } } } plzzzzzzz xplain me this java code like why i m including this packages n the whole code plzzzzzz
2417Can QTP be used for GUI testing ?, We are using Java with MySQL and Operating system is Linux. We are NOT using the web.
IBM,
2471
What are the differences between Java 1.0 and Java 2.0?
What are advantages of using Java?s layout managers than windowing systems?
How to implement RMI in Java?
What is the form of storage space in java?
Explain the architectural relationship between JavaBeans and JTA?
What are the built in javascript functions available to customize your web template?
How to use XML DOM model on client side using JavaScript.
On a scale of 1 to 10 rate your proficiency in CSS, JavaScript, PhotoShop, Illustrator, Flash, ActionScript, HTML, DHTML.
What software do you use to build websites? Give me an example of a project that you built using JavaScript. What kind of functionality did you create?
how we can know the funcions available in a class recording java?
When JAVA will be mature ?
What is the relationship between Java and middleware?
What HTTP servers and Java servlet engine combinations are supported with PeopleTools 8.4?
For the servlet layer on the web server, what version of the Java Servlet API are the PIA Java Servlets coded to with PeopleTools 8.4?
Compare CORBA security with security of other distributed object computing frameworks such as Java RMI or DCOM?