32,199 Topics
| |
I have been asked to count the overal time of an album. The user enters minutes and seconds in the formmat of mm.ss. I have wrote the folowing code but I don't get the result I supposed to get. I.E : 1st:3.55, 2nd 3.55 I got 7.1 instead of 7.50. … | |
I am trying to calculate the overall time of an album. The user enters the track length (double) in format mm.ss . Then convert this in a String so I can calculate min and sec separately. public void overallRunningTime() { int min = 0; int sec = 0; for(int i … | |
Hi everyone! I have in my GUI and two radio button **choco** and **gecode** and under each button (choco or gecode)I have 2 radio buttons *solution optimal* and *Feasible solution*: my problem lies in the selection buttons. Let me explain: when I click the radio button **choco**, I … | |
Hi, I'm trying to load four file File1 contain 50 first name File2 contain 50 last name File3 contain 50 dpeartment File4 contain 50 id number I want to load these file for example when the files load I want to generate (randomly) this output id,first name,last name, department but … | |
Dear All, I am trying to understand RMI Concept and have tried the sample steps and programs written in Oracle website [http://docs.oracle.com/javase/tutorial/rmi/compiling.html](null) In this URL they have mentioned to run the command as below javac -cp c:\home\jones\public_html\classes\compute.jar client\ComputePi.java client\Pi.java mkdir c:\home\jones\public_html\classes\client cp client\Pi.class c:\home\jones\public_html\classes\client I have tried the exact command … | |
Hello, I am currently using jtatoo to improve the look and feel of my GUI. The thing is that sometimes it works perfectly while sometimes it does not. I don't get any errors and I think this might be a bug with it. Is someone here aware of how to … | |
Hi guys. I decided to post this simple Photo viewer application. Its strictly for beginners, and cab be improved. /** * * @author Neon Tetras */ import java.awt.Image; import java.io.File; import java.io.IOException; import javax.imageio.ImageIO; import javax.swing.ImageIcon; public class ImageViewer extends javax.swing.JFrame { /** * Class constructor: ImageViewer */ public ImageViewer() … | |
i want to convert the value of my date into an integer value, i am using a jDateChooser in netbeans(swings) currently in my code below the value for inputDate is fixed or assingned but i want it to be based on the date a user picks using the jDateChooser. public … | |
I followed this code im new to programing and i wanted to make someones elses program then chnage it to my liking, i finesd the code and i tryed running it and all it send in the console was "<terminated> Main[Java Application] C:/Program Files(86x)/java/jre7/bin/javaw.exe (Nov 19, 2013 11:15:54: PM)" the … | |
How can I write a program that reads in a bar code (with : denoting half bars and | denoting full bars) and prints out the zip code it represents. Print an error message if the bar code is not correct. Once again I am very new to java and … | |
Hi Dw This is my second time asking this question but now I will just make it straight forward because I didn't get any response from my other question. I want to know how can I write a program or a script in java that will be burnt/embedded to a … | |
Hi all - I need to write a program that reads in an array of strings from a file and uses a radixSort method to sort and print the array based on what characters they are composed of. The implementation should be able to handle strings of characters. The characters … | |
Dear Team, I am Using Eclipse to Run my java programs. But when I try to run a Simple hello world program from Command prompt, I get the below error "Could not find or load main class Test" Test.class resides inside C:\ I Went inside C:\ in Cmd and typed … | |
write the psuedocode for a computer program that computes the sum of the numbers on the diagonal of a 10 x 10 integer array named *numbers*. Here is what i got but i'm not sure: int SIZE = 10; int [ ] numbers = new int[SIZE] [SIZE]; for (int I … | |
So I just began a college course in Java, and our first assignment was to write a text-based Mastermind game in Java. I was able to lay out all the necessary framework, but the area that still has me in a fix is getting the computer to check the secret … | |
Hai everyone, i have a problem, currently i am developing software using Java (netbeans): Currently my database looked like this: Username and UserType Fuhans and Administrator Nies and Member When i login with Username: Nies The program respond, but it gave me the dialog box where both Username are displayed. … | |
Hey Guys, I am interested in web development but i am confused in which platform to choose, Java or .NET. I have done core java but i got to know from somewhere that Java is basically for software development and DotNet is specifically for web development but Java can be … | |
Hi I am creating a java applet for an assignment, but if hit a snag. I have had to create a sales table for different sales people. I have made it that people can click "sales person 1" and it will display his sales. The issue is when you click … | |
I am trying to create a menu GUI. I am having problems with the action listeners Any help would be great. Thanks Write an GUI application that display a menu system. The menu system should allow the user to select one package, one phone, and any of the options desired. … | |
First time posting, so if I have formatting problems I'm sorry int randNum=0; Scanner in= new Scanner (System.in); Random randNumlist= new Random(); System.out.println("lowercase letters [a]"); String input= in.next(); System.out.println(" how many letters max 14"); int input2=in.nextInt(); if ( input.equalsIgnoreCase("A")) while( !(randNum>= (char)97 && randNum<= (char)122)) { for (int n=1; n … | |
Hi Dw There is a project I'm doing but I'm doing it in VB.NET I want to know now how can I write a program in jave that will govern the CD-RW and if the disc is inserted on let say a DVD player the program will detect that the … | |
So I have to make a code that asks the user how many times it wants the word "nonsense" to be printed on a new line, I managed to get it to work but its reverse, if i write 100 it prints once and 1 it prints hundred times, how … | |
Dear i want to make a program i which when Pressed UP Arrow key cicle start moving up and when pressed DOWM key circle moves Downword Similarly left and right i have draw circle and also implements Key Listner and can anyone give me ideo how i do this task … | |
So, this code is giving me some errors, any idea? private void pintarMobs() { JButton boton = null; Component[] botones = pnCastillo.getComponents(); for (Component c: botones){ boton = (JButton) c; int ac = Integer.parseInt(boton.getActionCommand()); int a = 0; Random r = new Random(); String foto = null; if( ac != … | |
How would one make one word of out put bold. I am making rock paper scissors using threads and I want to make the choice of either rock, paper, or scissors bold. So for example the output of the program would be "Player 1 chose **Rock**. How can I do … | |
I have written this code to find the cycle in graph public boolean hasCycle(int i, int[][] mat) { visited[i] = 1; // for( int i = 0; i < numNodes; i++ ) for (int j = 1; j < mat.length; j++) { if (mat[i][j] == 1 && i != j) … | |
Ok, I need help on a for loop nested program using for loops, I'm trying to use a patten that goes like this: 123456 12345 1234 123 12 1 but when I try it, it goes like this: 654321 65432 6543 654 65 6 This is my program: public class … | |
Hey guy, I am developing an enterprise application using JavaEE7 EJB 3.1 that is "Fast food restaurant management". Now I am writting a framework for user to create many types of event they wish. Let's say, like KFC or McDonalt, they usually apply many event to discount their products, or … | |
I am having trouble getting the health deductions from the TaxablePay method to the getNetPay method. I have tried everything I can think of including using a taxablePay class. I am running out of ideas. I have below... 1.The program description(what i want the program to do). 2.The expected output … | |
hai I have Sunjava 7 installed in my pc, but when i run my java programs in my linux it won't works it's again saying to install java what should i do |
The End.