35,619 Topics
![]() | |
Im creating a calculator that allows users to enter their own Loan Amount, then choose whether to input their own Loan Interest and Monthly Loan Terms, or to choose between a set of predefined loan terms and interest rate in a GUI. So far I have been successful in creating … | |
![]() | Ive created a memory game which has a grid of JButtons, when the button is clicked it changes the ImageIcon background to an animation which shows the front of the card. The problem is that when the button is clicked, the gif doesn't begin playing until the mouse is moved … |
Here is my code:- [CODE]/* * To change this template, choose Tools | Templates * and open the template in the editor. */ /** * * @author Administrator */ import javax.swing.*; import java.awt.event.*; import java.awt.event.*; import java.awt.*; public class MyQuiz { int score; JFrame frame; String[] questions = {"Who invented … | |
[CODE]package PAyroll; import javax.swing.JOptionPane; import javax.swing.UIManager; import java.awt.Color; import java.text.DecimalFormat; import java.text.NumberFormat; import javax.swing.UIManager; public class EmployeeProfile { public static void main(String[] args){ JOptionPane.showMessageDialog(null,"Welcome to Payroll System"); payroll(); } public static void payroll(){ int conf=0; // do{ String name=""; String add= ""; String contact= ""; String email= ""; String word=""; … | |
I'm working on a project that can recursively print out the items from a single link list. The project also require the reverse method should accept a reference to a generic single-linked list. This is my logic for printing the item in reverse: if the element in a node is … | |
Dear All, I am currently working on a small project whereby I want to use a SOAP client to insert Customer Values in a database. The connection to database class is working, the only problem is that it seems that the Web Service wont communicate with this class. In the … | |
Hi at all. I'm a new user of jsp and I've a problem. I would execute certain operations every X seconds in my jsp project like check data into mySql DB; I use a TimerTask java class and it's ok. But if I would update the UI inside the run … | |
Hi guys what I want to do is once the user has entered the id number it displays the results for the particular record. This works fine however what would I need to do to the following code so if the id number does not exist it produces an error … | |
Right, my program ran perfectly fine with the line [CODE]JLabel headerImage = new JLabel(new ImageIcon(img));[/CODE] But as soon as i put it into a JAR file it has problems, i have searched the inet for soloutions and there isnt much out there for apps, loats for applets though, but none … | |
Hey guys, I'm trying to create my own personal API (more like a simple way for me to write long codes), and i've run into a snag. I want to create a simple function to detect whether or not I want the consoleWrite() to print out a new line system … | |
Hello, I have one dataset as one arraylist. In that the columns values are in string as high, low, medium.. so how i display that values as string in c or java? pl reply me | |
Hello, everyone! I am trying to generate a random number with Java, but random with the fix number of reviewers per object.Example: I have 5 reviewers(r(i)) and 5 objects(o(j)), a[i][j] is the evaluation score that reviewer(r(i)) has evaluated object(o(j)), and my question is i want to labeled each object should … | |
I'm trying to use these icon images for my JButtons, but I keep getting "Resource not found: " [url]http://java.sun.com/developer/techDocs/hi/repository/TBG_Media.html[/url] [CODE] static ImageIcon createMediaIcon(String imageName) { String imgLocation = "/toolbarButtonGraphics/media/" + imageName + ".gif"; java.net.URL imageURL = Test.class.getResource(imgLocation); if (imageURL == null) { System.err.println("Resource not found: " + imgLocation); return null; … | |
Hello! Is there any standart Java libaries to interpolate an image? Thanks! | |
i was wondering if someone can help me with this Java codes? [CODE]/** * This is a class of Money for us to be able to input an amount and do addition or substraction * to it and display the balance.. * * @author HUBERT JIANG * @version 0.2 */ … | |
Hello Daniweb, I just created a small program that generates a random integer between a given range then asks the user to guess the number, giving hints like "Too high" or "Too low" along the way until they guess the correct number. I have it all working smoothly, except when … | |
The datafile which we need to upload to tables in our project, is an external ".CSV" file which has text in the following format (This is just 1/20 th part of it..the remaining has more sets as these, nearly 20 sets of such data with different values) @110516060031<M02m00-7959=+35.69,+35.69,+35.68,+35.68,+35.69,+35.69,+35.71,+35.71,+35.71,+35.71,+35.69,+35.69,+35.68,+35.68,+35.69,+35.69,+35.72,+35.72,+35.76,+35.76,+35.80,+35.80,+35.83,+35.83,+35.86,+35.86,+35.86,+35.86,+35.86,+35.86,+35.87,+35.87,+35.87,+35.87,+35.83,+35.83,+35.80,+35.80,+35.76,+35.76,+35.75,+35.75,+35.76,+35.76,+35.75,+35.75,+35.73,+35.73,+35.73,+35.73,+35.76,+35.76,+35.75,+35.75,+35.73,+35.73,+35.69,+35.69,+35.68,+35.68,+35.66,+35.66,+35.66,+35.66,+35.62,+35.62,+35.61,+35.61,+35.58,+35.58,+35.54,+35.54,+35.53,+35.53,+35.51,+35.51,+35.51,+35.51,+35.51,+35.51,+35.51,+35.51,+35.51,+35.51,+35.51,+35.51,+35.53,+35.53,+35.53,+35.53,+35.53,+35.53,+35.51,+35.51,+35.51,+35.51,+35.51,+35.51,+35.54,+35.54,+35.53,+35.53,+35.55,+35.55,+35.59,+35.59,+35.59,+35.59,+35.59,+35.59,+35.62,+35.62,+35.64,+35.64,+35.64,+35.64,+35.66,+35.66,+35.66,+35.66>172xxxxxxxxxxxx @110516060032<M02m02-7959=+35.30,+35.30,+35.30,+35.30,+35.33,+35.33,+35.34,+35.34,+35.37,+35.37,+35.37,+35.37,+35.37,+35.37,+35.40,+35.40,+35.39,+35.39,+35.41,+35.41,+35.41,+35.41,+35.39,+35.39,+35.34,+35.34,+35.32,+35.32,+35.29,+35.29,+35.26,+35.26,+35.23,+35.23,+35.22,+35.22,+35.21,+35.21,+35.19,+35.19,+35.19,+35.19,+35.19,+35.19,+35.19,+35.19,+35.19,+35.19,+35.19,+35.19,+35.18,+35.18,+35.19,+35.19,+35.18,+35.18,+35.18,+35.18,+35.18,+35.18,+35.18,+35.18,+35.16,+35.16,+35.16,+35.16,+35.16,+35.16,+35.16,+35.16,+35.16,+35.16,+35.18,+35.18,+35.18,+35.18,+35.16,+35.16,+35.18,+35.18,+35.18,+35.18,+35.16,+35.16,+35.18,+35.18,+35.18,+35.18,+35.16,+35.16,+35.16,+35.16,+35.16,+35.16,+35.18,+35.18,+35.16,+35.16,+35.16,+35.16,+35.16,+35.16,+35.16,+35.16,+35.18,+35.18,+35.16,+35.16,+35.18,+35.18,+35.19,+35.19,+35.21,+35.21,+35.22,+35.22,+35.23,+35.23,+35.25,+35.25>074xxxxxxxxxxxx @110516060033<M02m04-7959=+35.47,+35.47,+35.47,+35.47,+35.43,+35.43,+35.48,+35.48,+35.40,+35.40,+35.44,+35.44,+35.51,+35.51,+35.47,+35.47,+35.44,+35.44,+35.44,+35.44,+35.51,+35.51,+35.48,+35.48,+35.44,+35.44,+35.51,+35.51,+35.46,+35.46,+35.46,+35.46,+35.46,+35.46,+35.48,+35.48,+35.48,+35.48,+35.44,+35.44,+35.48,+35.48,+35.41,+35.41,+35.41,+35.41,+35.48,+35.48,+35.47,+35.47,+35.44,+35.44,+35.39,+35.39,+35.46,+35.46,+35.44,+35.44,+35.40,+35.40,+35.44,+35.44,+35.37,+35.37,+35.40,+35.40,+35.39,+35.39,+35.41,+35.41,+35.41,+35.41,+35.37,+35.37,+35.43,+35.43,+35.36,+35.36,+35.37,+35.37,+35.41,+35.41,+35.41,+35.41,+35.39,+35.39,+35.34,+35.34,+35.43,+35.43,+35.41,+35.41,+35.39,+35.39,+35.44,+35.44,+35.37,+35.37,+35.37,+35.37,+35.37,+35.37,+35.43,+35.43,+35.44,+35.44,+35.40,+35.40,+35.44,+35.44,+35.40,+35.40,+35.41,+35.41,+35.47,+35.47,+35.46,+35.46,+35.44,+35.44>162xxxxxxxxxxxx … | |
[CODE] try { HttpSession hs = request.getSession(); HashMap<String,Item> items = (HashMap<String, Item>) hs.getAttribute("items"); String [] allQty = request.getParameterValues("qty"); String [] itemcodes = request.getParameterValues("itemcode"); // for(String value: allQty){ // out.print(value+" "); // } // out.print("</br>"); // // for(String itemcode: itemcodes){ // out.print(itemcode+" "); // } // out.print(items.size()); int z = items.size(); … | |
Hey there, I made a splash screen class and called it in a main class where it operates. In my main class I have the splash screen followed by a menu window. I was wondering how could I make the splash screen appears and then right after the menu window … | |
[CODE] try { HttpSession hs = request.getSession(); HashMap<String,Item> items = (HashMap<String, Item>) hs.getAttribute("items"); String [] allQty = request.getParameterValues("qty"); String [] itemcodes = request.getParameterValues("itemcode"); // for(String value: allQty){ // out.print(value+" "); // } // out.print("</br>"); // // for(String itemcode: itemcodes){ // out.print(itemcode+" "); // } // out.print(items.size()); int z = items.size(); … | |
how should i prepare for company FMS (i.e. finance and manpower solutions) it is coming for placements on 12 march. | |
Me and my group members are planning to add something different to our program, we intend to put JTextField, but we have no idea on how to start it because some of the tutorials are so hard to understand. this is our program: it is a payroll system: [CODE] public … | |
Hi guys can anyone tell me if it is possible to sort integer values for smallest to biggest which has been stored in my database as Strings. What I want to do is list my items in an textarea that sorts the numbers from smallest to biggest. Also note if … | |
Hi i need to make a method that does the example below if the array contains these number -12 3 -12 4 1 1 -12 1 -1 1 2 3 4 2 3 -12 The output should be: N Count 4 2 3 3 2 2 1 4 -1 1 … | |
Whats the best and easy way to learn JAVA and anyone can suggest a very good and simple website to learn and workout JAVA codes. | |
i am making a simple bike site using servlets.i have a hyperlink toh a productServlet in menubar..but when i click dat hyperlink.it keep on showing connecting.and page do not load..anyone can tell what could be the reason..i can't show code here.. | |
Hi... I am a beginner in jsp...Can any one help me with a small project like addressbook or something, so that I can get an idea about how to do a project in jsp....I am using tomcat-6 and oracle 10g for my project...If not with a project atleast help me … | |
write a Java program that performs the following task on an input text file. 1. Determine the number of characters 2. Count the number new-lines 3. Identify the number of empty lines. I have been working on this problem that I saw on the book and the part where I'm … | |
hey guys can anyone help me to build a java prog which does three sorting logics in the same prog and it can be any sorting and i m trying to do in all sorts one thing is i get is i m failing in it and guys thnks a … | |
Hello, I am stuck on this issue since like a week now and i have been trying to find out how to do this. I am trying to copy the ArrayList elements into another class. I have 4 classes: registration class (MAIN CLASS) address class (DONE) student class (DONE (kinda)) … | |
I need this program to take user entered information, check and see if the object exists and add it if it doesn't. I keep getting a nullpointer exception when trying to add an owner to an Arraylist. I've included the relevant part of the driver class, the OwnerParser class that … | |
I'm trying to build a program that has a user guess 4 random pegs in order. it needs to use arrays and methods and i'm struggling mightly... here are some parameters The structures must be declared as variables in the main() method. You must write your program so that the … | |
Hello, I am new to java and I was wondering if you guys could help me solve this problem: Your history instructor gives three tests worth 50 points each. you can drop one of the first two grades. your final grade is the sum of the best of the first … | |
The program has no errors and when ran will show the logo, buttons but not the inventory data. I have been working on figuring out why it will not display the cd information with no luck. Could use some fresh eyes to look at this and help me figure out … | |
Program created in BlueJ: For this Assignment I am to create a magic square from odd numbers >= 3 input by the user. I want to test my code to see if it works, but I can't figure out how to actually print the square from the number input by … | |
Ok im writing a program in java thats suppose to Use a while loop, to print the lower case alphabeth and its corresponding ascii values of the upper case alphabeth from Z to A So far i came up with while (counter +32) (char) (counter +32) if (counter < ?) … | |
For some reason my output is not showing right when I run it. I am showing the code and providing a screen shot of what it's doing. It's bunching lines together. [CODE]public void requestData() { System.out.print("What is the model number?"); modelNumber = scan.nextLine(); System.out.print("What is the camera brand?"); brand = … | |
Hello, I need assistance with this java program I am writing, Im trying to make two buttons and when you click the button, it has a counter, and everytime you click it it prints a message saying I was clicked n times. This is what I have so far and … | |
[I]Create a program called, Containment, that accepts three command line arguments, a file that contains a list of shapes, and a pair of numbers the specifies the (x,y) coordinates for a point. The program should print out the list of shapes, and a true/false value that indicates if the point … | |
I want the program to compare what the user puts in and then compare that string to something in an array and see if it is a match. Here is code for things already put into array [CODE]private static void createExistingUserData(Scientist[] scientist){ scientist[0] = new Scientist("user1", "password1"); scientist[0].setDob("02/02/1995"); scientist[0].setSsn("612-45-7070"); scientist[0].setApplicantName("Peter … | |
Hi guys, I just purchased SCJA exam simulator from whizlabs and i pass the final exam with over 92% but i'm still afraid to fail in the real exam. So, what else i need to do to ensure passing the exam?? Thanks | |
Just need someone to confirm that what ive done is good . It compiles but i need confirmation that its good and up to standards . this is the first class import java.io.Serializable; public class Flight implements Serializable { //instance variables private String flightNumber; private String day; private String destination; … | |
Hey I have this code: This is my main part of my program: [code=Java] import org.apache.commons.pool.ObjectPool; import org.apache.commons.pool.impl.GenericObjectPool; import Fecha; public class someclass { private GenericObjectPool<Fecha> fechapool; public boolean somefunction() { System.out.println("Im going to set set actives"); fechapool.setMaxActive(5); System.out.println("set actives sets"); } { [/code] It doest get to the "set … | |
Write a program that reads characters from the keyboard until a period is received. Have the program count the number of spaces and display it to the user. After that, ask the user if he/she would like to count a specific character. Terminate when the user is done counting the … | |
![]() | Hello all, I have an assignment for one of my modules which involves writing UML Class diagram software which then outputs skeletal java code. The main window contains 3 things - a menu bar at the top, a panel on the left-side containing buttons and a draw area, where the … |
Hey guys, I am taking my first quarter of java at college and i'm having some difficulties with just 1 method for my current assignment. I wasn't planning on getting help, but I've been stuck on this for hours now, so i've decided to go to the pros. Here's what … | |
hey guys ive been given a peice of work which i totally forgot about, its due tomorrow and i have no idea what im doing, can any of you guys help me out there please, as i will be learning how to use java after i hand this work in … | |
If the class members declared public and the class itself is specified as default access ( Package access), then can the public members of that class be used in another package? I am asking this because .. as far i know class which is not specified as public cannot be … | |
[CODE]import sun.audio.*; import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.io.*; public class Sample { public static void main(String s[]) { JFrame frame = new JFrame (); frame.setSize(200,200); JButton justin = new JButton ("Click Here for Welcoming"); frame.add(justin); justin.addActionListener(new AL()); } public static class AL implements ActionListener{ public final void actionPerformed(ActionEvent … |
The End.