32,204 Topics
| |
I've written a code tat reads x and y co ordinates from a txt file and drawlines on the panel. i need to save the written geometry on the panel as a jpeg image, can any one help me out wat should be written in the action listener part of … | |
[CODE]import java.awt.*; import javax.swing.*; import java.sql.*; import javax.swing.text.MaskFormatter; import javax.swing.table.DefaultTableModel; import java.util.Vector; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.MouseListener; import java.awt.event.MouseEvent; class MyFrame extends JFrame implements ActionListener,MouseListener{ Container c; JLabel lAccountNo,lAName,lDateofOpng,lAddress,lContactNo,lTotalBalance; JTextField tAName,tContactNo,tTotalBalance; JTextArea tAddress; JFormattedTextField tDateofOpng,tAccountNo; JButton bAdd,bNew,bDelete,bExit,bUpdate; DefaultTableModel mAccthld; JTable tAcctHld; MyFrame(){ c=getContentPane(); setSize(Toolkit.getDefaultToolkit().getScreenSize()); setTitle("Account Holder"); setLayout(null); lAccountNo=new JLabel("AccountNo."); … | |
Hey im working on a code where i need to get a certain column of a 2d array and create a 1d array with the information. The information im using is a product list in an aray in thsi format [barcode][price][stock] Now i need to grab the bar codes of … | |
I made a scanner, took asked the user to input an int, then a String and then another String. But after I put in an int and press enter, it skips the 2 String inputs. Why? How can I fix it? | |
I get this error when I run my applet on a website [CODE] Java Plug-in 1.6.0_26 Using JRE version 1.6.0_26-b03 Java HotSpot(TM) Client VM User home directory = C:\Users\Adam ---------------------------------------------------- c: clear console window f: finalize objects on finalization queue g: garbage collect h: display this help message l: dump … | |
Hello I am trying to figure out how I can use a while loop to construct an object and ask the user if they want to construct another one and add 1 to the name. For instance I am creating an Employee class that I want the name of the … | |
I am working on a program with two classes that is supposed to handle hotel information and am getting confused on how to work with an array properly. Here is my code so far: [CODE] public class Hotel { Scanner scan = new Scanner (System.in); public int[] HotelArr = new … | |
So i'm working on a java program where I ask for a file name, read it into an array. My problem is that im using a string tokenizer to delimit my commas and that put the student information into an array object. I have 10 arrays that are supposed to … | |
I'm creating a program that perform store data and retrieve data from the arraylist. I have no clue make the program find the data in Arraylist and display the data that user is looking for. If data is not in the list, the program would print the line say that … | |
I don't know am i asking right question or not but my question is: I want to create a simple search site so I've team with different jobs. I have its database part to handle. I should create its database and i have not idea what should i do. I'm … | |
An hourly employee is paid at a rate of 125 per hour,from the workers gross pay,12% withheld for income tax,and 15 withheld for union dues. If the worker has 2 of more dependents additional 120 for health insurance. Write a java program that will input the total deduction,basic salary,gross pay … | |
Can someone suggest me what classes I can make in developing a system of a cell shop and also the attributes or the properties of each classes and what method of each classes I can do.... [QUOTE]I really need suggestion [/QUOTE] | |
can any one help me for some project guidelines on java. i am a final year student and am not confident enough to select project topic... but i think i am good with java concepts..... | |
Hi, I am facing problem regarding the element wise comparison of two strings and finding the difference of two Strings where one sting is not sub string of other. More than that Strings are of different length. Let String 1= "1 2 3 4 5" String 2="3 4 5 6 … | |
please help me in my code the error appears and i can`t figure it out. i used to write a program that will accepts the user input, but only a word then the program will scramble the word that had been inputted by the user and display it on JFrame(WINDOW) … | |
Hai all, Please help me to compare two xml files using vb script or java script. example of xml file [CODE] <table name="uninstall_software" numRows="0" remarks="" schema="dbo"> <column autoUpdated="false" digits="0" id="0" name="swtitle_id" nullable="false" remarks="" size="10" type="int"> <parent column="id" foreignKey="c_uninstall_swtitle_id" implied="false" onDeleteCascade="false" table="software_title"/> </column> <column autoUpdated="false" digits="0" id="1" name="machine_id" nullable="false" remarks="" size="10" … | |
hi,I am final year student of computer engineering and wanting to do my project in java language i.e. also web application.So please suggest me project idea if u have any. | |
I'm trying to create a triangle that would be display along side rectangles and circles after I run NervousShapes. I can't seem to get it right. I try doing it with the math but doesn't create the triangle the way I want it. If anyone one has done the NervousShapes … | |
Guys,i want to wait or sleep statement in a Java Desktop application when button press.I used thread.sleep & wait().But it doesn't work.I have a doubt that those functions are working only for console applications.Is it? or can i use it?Plz help me.... | |
I am making a program in which the program assigns a variable to the numbers 1 - 10. I am suppose to use wait and notify. I put them in but I don't know how to assign the variables to the numbers. My code is and could someone tell me … | |
I've created a gui for the day of the week program. The problem that I'm having is adding functionality to this program. I would like this program to allows a user to select a month and day from choice menus, and enter a year in a text field. Whenever the … | |
I don't know where did I do wrong here, but it is a compiler error. I was try to create an Arraylist that can store the double value. For some reason, I got a compiler error when I try to create an Arraylist. By the way, the assignment specifically ask … | |
Can someone explain why, when I input 'mytag' it does find it? When I debug, it shows the text matches, but the IDs are different. Not sure why that would matter? [code=java] public void RemoveTag() throws IOException, NoSuchTagException{ System.out.printf("Tag to delete: "); BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); String tempTagText … | |
import java.awt.*; import javax.swing.*; import javax.swing.table.DefaultTableModel; import java.util.Vector; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.text.MaskFormatter; import java.sql.*; import java.awt.event.MouseListener; import java.awt.event.MouseEvent; class MyFrame extends JFrame implements ActionListener,MouseListener{ Container c; JLabel lRollNo,lName,lAge,lMarks; JTextField tRollNo,tSName,tMarks; JTextField tAge; DefaultTableModel mStud; JTable tStud; JButton bAdd,bNew,bRemove; MyFrame(){ c=getContentPane(); setLayout(null); setTitle("My Frame"); setSize(800,700); setLocation(10,10); lRollNo=new JLabel("Roll no"); … | |
showing illegal start of expression in defining functions of mouselistener interface import java.awt.*; import javax.swing.*; import javax.swing.table.DefaultTableModel; import java.util.Vector; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.text.MaskFormatter; import java.sql.*; import java.awt.event.MouseListener; import java.awt.event.MouseEvent; class MyFrame extends JFrame implements ActionListener,MouseListener{ Container c; JLabel lRollNo,lName,lAge,lMarks; JTextField tRollNo,tSName,tMarks; JTextField tAge; DefaultTableModel mStud; JTable tStud; JButton … | |
I have made a simple java program that gets a user to fill out a form, and then checks if all the parts were filled out. I am now having trouble with how to send the file in an email to a set users email account. How could I do … | |
I have been working a program that allow the user to perform the following task, add student, display student, delete student, and find student. I need help with add student name, gpa..etc to the arraylist. But I keep getting either compiler messages or other error message. I have been trying … | |
Which compiler is needed for the following code? [CODE]import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.util.*; import javax.mail.*; import javax.mail.internet.*; public class Main extends JApplet implements ActionListener{ JTextField firstNameArea; JTextField lastNameArea; JTextField emailField; JTextField phoneNumber; JCheckBox myselfBox; JCheckBox someoneBox; JTextArea messageArea; public void init (){ setSize (250,300); setLayout (new BorderLayout … | |
Hi all, I am currently trying to pass an arraylist as a parameter for adding and deleting a student from the arraylist. Well, I have just learned about arraylist. Is it possible to pass an arraylist as parameter. Your help will be highly appreciated. Thanks. My codes below: [CODE]package student; … | |
[CODE]public class GAME { boolean gamestatus = true; double amounts[] = {0, 0.01, 0.5, 1, 5, 10, 11, 14, 20, 300, 600, 150, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 28 }; Briefcase briefcase[] = new Briefcase[27]; public void casesSetup(){ for (int i … |
The End.