32,204 Topics

Member Avatar for
Member Avatar for piers

I have a section of code in a programme I have: [B]long b; if (show>1189&&<1189*2) { b=1; } else if (show>1189*2&&<1189*3) { b=2; } else if (show>1189*3&&<1189*4) { b=3; } [/B] The variable show is an already defined string which takes a number value. So I want to output the …

Member Avatar for piers
0
83
Member Avatar for blanklogo

I am a student taking a java class online. its kinda hard because I don't have anyone to talk to directly. I do not want someone to do this for me i just want a simple yes or no answer. I have created a program for my second assignment. The …

Member Avatar for johnsene
0
149
Member Avatar for chrisw09

I'm working on a small program that i'd like to deploy using java webstart. I have everything working but when I launch the program using webstart/jnlp, a statusbar is added to it (see attachment) which says "Java Application Window". It's not there when i run the app locally. Any idea …

Member Avatar for chrisw09
0
112
Member Avatar for tinamary
Member Avatar for ~s.o.s~
0
139
Member Avatar for Renzokouken_22

[code] import java.awt.*; import java.awt.Event.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.sql.*; import javax.swing.*; public class UpdateRecord implements ActionListener { private ScrollingPanel fields; private JTextArea output; private Connection connection; public UpdateRecord(Connection c, ScrollingPanel f, JTextArea o) { connection = c; fields = f; output = o; } public void actionPerformed(ActionEvent e) …

Member Avatar for ~s.o.s~
0
76
Member Avatar for JavaNewbie07

I am trying to call an external class with the following line class "classname" implements "another classname" { ..I however keep getting an "Interface expected here" error at compilation. What am doing wrong, please?

Member Avatar for orko
0
116
Member Avatar for champagne
Member Avatar for orko
0
90
Member Avatar for ceyesuma

I try to set a variable in another class. It does not. It goes to that class and the variable is always 0and the program stops. I know its something basic that I should know but I need it to set the variable and continue in the calling class. Any …

Member Avatar for orko
0
89
Member Avatar for ceyesuma

Does anyone have time to look over a 3 class program? I get a NULL POINTER ERROR. What is the best way to debug a variable that produces this error? Thanks

Member Avatar for orko
0
82
Member Avatar for SirJames

Wanted to verify that this actually does check for all wins- if so I need to a statement that a tie does still exist and where to add it...Opinions and suggestions please.. method displayHandName() writes out the hand found. [CODE] public static void determineWinner(int[] finalHands, int[][] hands) throws IOException { …

Member Avatar for SirJames
0
117
Member Avatar for cmymazda

Hello everyone I am a new to java and I am trying to get help with my inventory program. Here is the assignment ..Modify the Inventory Program by adding a button to the GUI that allows the user to move to the first item, the previous item, the next item, …

Member Avatar for cmymazda
0
136
Member Avatar for Catgirl

I have all of my program working except the following buttons (add, modify, delete, save, search) which I have the buttons, but turned off in my program so it will still compile/run until I get the button functionality fixed. To be honest, I have no clue on what code needs …

Member Avatar for no1zson
0
84
Member Avatar for MxDev

hi guys, I've simple question is what happen as general when setup is running i mean what and why the program setup store some settings in registry or hard drive instead of running without setup, i see some applications could run without setup just click and run. i hope someone …

Member Avatar for lookof2day
0
102
Member Avatar for ajcornwell

I am stuck again, I was able to complete last week's assignment without having to post, just so you guys don't think I'm a lost cause! :) I need to allow the user to input loan amount, term, and interest rate before calculating the monthly payment and showing the table. …

Member Avatar for Ezzaral
0
122
Member Avatar for Icetigris

This compiles, runs fine, and generally works, except for one thing. The contains() method doesn't work properly. For some reason table.contains(key) isn't returning the right value, which is thereby messing up the insert() method. [code=java] public class HashtableDictionary implements StringDictionaryAlgorithm { static final boolean debug = false; Hashtable table = …

0
59
Member Avatar for vishalkhialani

Hello, I am about to start a project for my company where I am going to make a module for the production planning of our factory. Currently we are using excel to do this job which creates a lot of problems. Please see the attached picture of the excel file. …

Member Avatar for vishalkhialani
0
80
Member Avatar for vladdy19

Can any one give me any troubleshoot tips to get my applet to at least show up? It seems like I have most of the things right I'm sure the error is something small.

Member Avatar for peter_budo
0
63
Member Avatar for genocide
Member Avatar for schoolsoluction
0
113
Member Avatar for fishguts

I am working on a java assignment for my cs 111 class and I keep getting an missing return statement error, and have tried to determine the error but cannot locate it. I am sure that I have the right set of curly braces. My code is shown below. If …

Member Avatar for fishguts
0
93
Member Avatar for sportymon1

Hi I use Windows XP SP2 and both IE6 and Firefox will not open javascript links. If I click on the link nothing happens. On one site its javascript.popwin(...) and I click on it but again nothing happens. I've tried disabling pop-up blockers, installing latest version of MS scripting, updating …

0
44
Member Avatar for Caled

Hello all, is there a way to cancel or abort the execution of current actionPerformed? My problem is that, when the control is passed to the listener method, i perform checking if certain value is null, if so, display Error Msg using JOP. when user click OK, then the actionPerformed …

Member Avatar for Caled
0
1K
Member Avatar for apontutul

There is no operator overloading in JAVA, but operator + is used as arithmetic addition and concatination operator. why ? please clarify this

Member Avatar for Ezzaral
0
72
Member Avatar for pulkitmalhotra

Please tell me how to transfer values from one method to another wherein the second method is trying to access the value from the first method and the second method takes in parameter from some other method.

Member Avatar for orko
0
124
Member Avatar for piers

I am trying to teach myself java and I have a book but it doesnt have how to parse an int into a string. So are there any ways of either doing this or getting round it so I can display my answer? I put in bold the place where …

Member Avatar for piers
0
113
Member Avatar for Caled

Hello people, How can i display the JLabel text using external file.. When user click a button, a file is read and retrieve and will be displayed at the label.. what I did was: 1) Declare all the necessary file IO 2) use the useDelimiter() method to read the file …

Member Avatar for Caled
0
1K
Member Avatar for gr8fubar420

im trying to convert the int input into a string so that i can find the length of it and use the substring method. how may i go about this? [CODE]import java.util.Scanner; public class OddEvenZero { public static void main(String[] args) { int input = 0; int len = 0; …

Member Avatar for Ramy Mahrous
0
318
Member Avatar for KimJack

Hello All, I would like to create a Student class as follows: class Student { String name; int age; int studentNum; String instructor; } My question is how would I read information from a text file into an array of class Students? The file is as follows: Sue Jones, 19, …

Member Avatar for Ezzaral
0
90
Member Avatar for Khishin

I'm not sure if my title adequately explains what I want to do, so I'll provide a scenario. I have two classes in a folder, one named UserInterface.class and another named HelloWorld.class, and the contents are as follows: [code=java] import java.util.Scanner; public class UserInterface { public static void main(String[] args) …

Member Avatar for Khishin
0
149
Member Avatar for ceyesuma

Can someone show me a simple program that will display how to extend and use super?

Member Avatar for no1zson
0
114
Member Avatar for nwad

I want to implement Dijkstra algorithm for shortest paths in Java, can anyone please help me with the code.

Member Avatar for jwenting
0
81

The End.