32,199 Topics
| |
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 … | |
Can this code of mine be more efficient? [CODE]import java.util.Scanner; public class Game { public static void main(String args[]){ boolean gamestatus = true; //Boolean to control the whole game double total = 0; //Temporary variable for storing the average Banker banker = new Banker(); //creation of the object banker; int … | |
I want to produce a moving average for a time series using the JFreeChart MovingAverage.createMovingAverage method in org.jfree.data.time.MovingAverage. But my data is a countdown, i.e. the values for the time parameter are counting down. So when I apply this moving average function it produces a moving average counting up not … | |
Hi guys.. The method createScreenCapture() in Robot class made me to post this question. The method works absolutely fine and it does the functionality of capturing screen as it asked to do. Now the problem comes here when i take the snapshot of my screen while i play a game. … | |
Hello. I am developing a class manipulater in which I add and delete some fields and methods. I have a main class which is connected to GUI. Whenever I change a class, I have to restart the GUI in order to get the changes applied. I would like to gently … | |
import javax.swing.*; public class NestedLoop { public static void main(String args[]) { for(int x=0;x< 5;x++) { for(int y=0;y<=x;y++) { System.out.print("*"); }// end innerloop System.out.println(""); }//end outerloop System.out.println(); }//end main }//end class |
The End.