32,199 Topics
| |
Hi I got some trouble with my program and I need help. this is the code: public void actionPerformed(ActionEvent arg0) { Object source = arg0.getSource(); if (source == Button1) { System.out.println("Player has choosen the button: " + "button1"); String EP = JOptionPane.showInputDialog("Please enter your file location"); String Path = EP; … | |
If any one can help me please to answer this questions please: 1. What is the difference between this.dollars and otherMoney.getDollars() 2.- What the return statement of this method is returning. 3.- How this method would be called from the main and give an example Thank you in advanced. // … | |
If there is a String Buffer, and a String Builder based on array technology, why then is there no equivalent mutable data type based on a Linked List? Or is there? | |
note player is a space ship. in player class i have set up collision so that player cant go above window and below. player class public void playerWCollision() { if(y < 0) { y = 0; } else if(y+height > Main.WINDOW_HEIGHT) { y = Main.WINDOW_HEIGHT-height; } } lets say player … | |
Hello I have this: String price="10,00 €"; int num=2; int sum=Integer.valueOf(price)*num; System.out.println(sum); //Should print out AT LEAST 20,00 But note: That € sign can be $, €, £ or another AND it can come before or after the numeric float amount. What is the best way to do this? Thank … | |
Hello Everyone I tried to open a .class file with word format and now all my class files have that Microsoft word icon on it. But I want to remove it and take my .class files to previous style (ie plane style with no icons on it). Is this possible … | |
I've been trying to figure out how to launch a java application from a single double click file like you would Microsoft Word or Firefox. I think I've seen a couple of Java applications that do this, but I haven't seen how. | |
Hi, thanks for looking at this thread. :) **The goal:** I have this 2D boolean array (from my [decoder](http://www.daniweb.com/software-development/java/threads/452559/decoder-simulatorcalculator-complement-of-2-problem) thread). I managed to write a method that goes through the rows and appends a '1' or a '0' to a string based on what's in the array (1 for true, … | |
Hi Everyone, I've been working on creating this code for a project I've been working on but I can't seem to get it to work. I'm creating a service class that I can then pass to a client class that will read a list of cities that ends in a … | |
Hi! It's me again and [this](http://en.wikipedia.org/wiki/Decoder) is a decoder! **The goal:** And I'm trying to make a program that solves logical problems related to the decoder device. For that I need a loop that write true/false into a boolean[][] based on the rules. Say we have a decoder with 3 … | |
Hi everyone. I am doing a USACO training assignment, and the instructions are as follows: > Is Friday the 13th really an unusual event? > > That is, does the 13th of the month land on a Friday less often than on any other day of the week? To answer … | |
I have made 4 classes that represent an Employee based Java GUI. They are Person, Employee (extends the Person class), EmployeeFrame (used to model a JFrame), and EmployeeTester (contains the main method to run the GUI). What I want the GUI to be able to do, is allow the user … | |
Write a program with subclass InterestAccount and CDAccount. The driver program (Account.java) must perform following transactions: 1) Print the name of your bank and yours at the top. 2) Creat an Intrest Account for "Benjamin Franklin" with PIN of 1234 and a starting balance of $100. 3) Creat a CD … | |
Hi, i have plenty of excel files i have to read them and store the data in a database. I am using eclipse as editor and mySQL. I am using APACHE POI to read the excel files and JDBC for the connection. The excel files have the structure as the … | |
Java SE JRE 7 update 21 is now available, with fixes for dozens of security-related issues. Immediate installation is highly recommended. Head on over to Oracle's Java download page and grab it now. There is also a version for Java 6 users, if any such animals still exist. | |
Hi, I have installed Eclipse Indiog Service Release 2 and Java 1.7. I have created a simple HelloWorld program in Eclipse. However, when I am running app using Run As Java Application its generating error as below : First Message : Java Vertual Machine Launcher : An error has occurred. … | |
Hey guys, i found this tutorial online that involved searching your database for an existing value. I have changed the code around so it fits with my system but when i run it the input displays but once i press ok the input box closes and nothin else happens. Heres … | |
is it possible to input your name, middle name and surname and then will display initilas in large block letter made up of same character it represents??? | |
How do I implement a frequency counter in a treenode that increases when the user enters an existing word? I have a program where the user is asked to choose: enter string, search for string My frequency counter is not working properly. How do I keep track of the frequencies … | |
Hi, I'm trying to use Case base resoning in Poker. Does any one have any experiance or samples to share? I would like to set the parameters with which I 'describe' the problem situations (eg, a similar sequence of previous moves,user cards, Player Position,..) Depending on certain parameters I would … | |
Hello I, like everyone else, has made a text based calculator but Ive never worked with GUI in Java. Im using MyEclipse. Very simple. Numbers, four symbols (+, *, / and -) and "=" Nothing else How would I even start with this? Thank you | |
I have a jar file generated in netbeans that has my 1.5 million+ lines of code compiled perfectly and has been running in the Netbeans enviornment for years. I need to know if I can use my build.xml that I am learning to write in eclipse to manipulate that dist.jar … | |
hello, guyzz,,i hope you can help me,,actually,,this is not my whole code.but please help me with this... public class Calculator { public static void main (String args[]) { String exp = JOptionPane.showInputDialog("Enter mathematical expression: "); exp = infixToPostfix(exp); JOptionPane.showMessageDialog(null,"Postfix expression: " +"\n"+ exp); public static String infixToPostfix (String infix) { … | |
I am working on a project for class. I have to write a program that reads in an infix expression and converts and it to postfix and evaluates it. Currently I have it to where I can convert an infix expression with no parentheses to postfix, but am having some … | |
Hi guys, If i have to give a short description about my skill set, i would say i am PHP developer. I have been coding in PHP for the past 4 years and its been an year and half that i have been using CodeIgniter. I loved it! I wanted … | |
Hello! i am working on a computer based text (CBT) software. i need assistance on how to add a count timer so that once the timer counts from (say 45 - 0) mins, the software should. i will be very grateful if i'm given this assistance... thanks | |
Hi, I'm new to this forum and look forward to contributing. I am currently working on a project where I have to build a Java simulator which consists of three input lines of food, three processing machines and two packing machines. There are 2 processing machines dedicated to processing perishable … | |
Hello, I have been writing a program that allows for client/server communication. The game sends questions to the client, and allows the user to answer the question. It repeats 10 times, then gives a final score based on the user's answers. My question is how do I only allow 10 … | |
When I run the game and try to use the Arrow keys to control the movement of the selection box, nothing happens. I'm pretty sure the game is redrawing itself properly because the ticker text is updating. Aswell, I tried doing: selectVal++; in the update function in TankShooter.Java, which made … | |
I have a class which includes a constructor that holds hours and speed, getters and setters, and a method which calculates distace using the hours and speed variable. I need this to display a table which takes however many hours the user inputs, then for each hour display a row … |
The End.