32,199 Topics

Member Avatar for
Member Avatar for supertux

I'm using Eclipse and when I try to build the JMS example included in j2ee tutorial, it return a NullPointerException at this: [code]connection = connectionFactory.createConnection();[/code]. Here's the code of that example: [code]public class Producer { @Resource(lookup = "jms/ConnectionFactory") private static ConnectionFactory connectionFactory; @Resource(lookup = "jms/Queue") private static Queue queue; @Resource(lookup …

Member Avatar for JamesCherrill
0
171
Member Avatar for schoolbus11

What I'm trying to do is to take 7 of the scores from judges and discard the lowest and the highest score then average five scores that remain after. I got to where I can get all of the scores, but I have no idea how to take the lowest …

Member Avatar for Overbooked
0
108
Member Avatar for Pokenerd

Hi guys, I am writing a small application which needs to load some images, and other resources. I am currently trying to find the best way to package these resources in my application. I have looked at some examples, I but I have been having trouble understanding them, and many …

Member Avatar for lee.j.baxter
0
157
Member Avatar for datasmith

Hello, I need to send messages to Android phones through P2P on 3G connection. Sending and receiving works perfectly on lan ip addresses(on wi-fi) but not on 3g or 2g. On 3g I send a message but it never appears on the other end of the line. Can anyone tell …

Member Avatar for anubis_1969
0
165
Member Avatar for Son of a gun

Can I ask for some advice / help please, I am writing a UI that upon the user making a selection from a drop down list it then populates details about the selection in text boxes. I am writing this as three classes the main class, the UI (User Interface …

Member Avatar for Son of a gun
0
108
Member Avatar for rational_

Design and implement an object-oriented program describing two kinds of BANK accounts, [B]FixedFee[/B] and [B]ChargeableFee[/B], that differ in the way that fees are charged: • FixedFee: There is a fixed £5.00 fee at the end of the each month • ChargeableFee: Each withdrawal costs £0.50. The total fee is calculated …

Member Avatar for apines
0
305
Member Avatar for minimi

[CODE] import javax.swing.JOptionPane; public class Test1 { public static void main (String[] args) { // Method 1 Test3 method1 = new Test3(); // is this the method to call Test3()? JOptionPane.showMessage (null, method1 // Method 2 JOptionPane.showMessageDialog (null, Test3()); // Method 3 JOptionPane.showMessageDialog (null, Test3.toString()); } } class Test2 { …

Member Avatar for apines
0
141
Member Avatar for intes77

[CODE]import javax.swing.*; class Month { public static void main(String[]args) { String value=JOptionPane.showInputDialog(null,"Enter Month Day and Year"); if(value.length()==10) { char Month=value.charAt(0)+value.charAt(1); char Day=value.charAt(3)+value.charAt(4); char Year=value.charAt(6)+value.charAt(7)+value.charAt(8)+value.charAt(9); JOptionPane.showMessageDialog(null," "+Month+"/"+Day+"/"+Year+""); } else { JOptionPane.showMessageDialog(null,"INVALID INPUT!!"); } } }[/CODE] Hello i need help about combing the charAt()'s for example i would input 05/05/2010 i want …

Member Avatar for intes77
0
439
Member Avatar for jemimaloh

hi there. Just wanna check if I am coding this wrongly, [CODE]int sumOfVotes = 23 int howlong = 94 double SimPercent = ((sumOfVotes / howlong) *100);[/CODE] Shouldn't the answer, SimPercent, be 24.4? Tks!

Member Avatar for jemimaloh
0
96
Member Avatar for serph09

Hi, I got a compile error of incompatible types - lang.object is found but int expected on line 21. But when i put int in front of square, it says .class error:/ P.S. I didn't write everything here, I got some codes from other programs:P [CODE]import java.util.ArrayList; /** A magic …

Member Avatar for hanvyj
0
165
Member Avatar for 080346

Hello everybody; m screwed by searching, and dont get any satisfactory material, i want to know that, if i have a button of NEXT then how it will close that GUI and open the new one from another class?? kindly help me

Member Avatar for kramerd
0
86
Member Avatar for ItecKid

Hello, everyone, Next semester, I will be taking a course in Java programming language, and was wondering if anyone knew of a good IDE that runs in the Red Hat/Fedora environment. (Preferably something installed through YUM.) I tried a Google search on this, yet the only thing I seem to …

Member Avatar for Computerphile
0
386
Member Avatar for dead1

i need to write a code that will download an excel file from a website every time it is ran. what im trying to do is automatically import real time electricity rates into excel. im a beginner in programing and am seeking help for my senior design project. Thank you

Member Avatar for hanvyj
0
78
Member Avatar for sazad1

i want to download a file from ftp to my local machine using java code. Can anyone help me out pls?? n provide the jar file used in the code.

Member Avatar for sazad1
-1
188
Member Avatar for 080346

hello; i have gui on which i have a button of ADDMEMBER and this is in my package of Member; now i want to open another gui from another package of LIBRARY; how i will do it?? i have searched it alot kindly answered me .... Thnx

Member Avatar for hanvyj
0
91
Member Avatar for BboyRodimus

I have this recursive method that counts the amount of negative numbers that lie in the array called "NumArray" [CODE]public static int countNegative(double[] NumArray, int startIndex, int endIndex) { if (startIndex == endIndex) { if (NumArray[startIndex] < 0) { return 1; } else return 0; } else if (NumArray[endIndex] < …

Member Avatar for apines
0
1K
Member Avatar for nellyznell

I'm trying to evaluate postfix expressions but i cannot get it right. I always get the result value as 0 and in my evaluate method it keeps saying my num1 num2 and result have not been initialized. Any help is appreciated. [code] package collection; import java.io.*; public class Postfix { …

Member Avatar for CLina
0
1K
Member Avatar for Iamthecheese

Hello, I'm having trouble translating an algorithm. I'm not sure I coded bits of this correctly, but I'm certain that I have no idea how to compare an item with a node identifier (cannot apply > operator with T,T) but since this is an insert sorted method rather than insert …

Member Avatar for kramerd
0
181
Member Avatar for BboyRodimus

So I'm suppose to create some code that will perform some methods in recursion. Here's the prompt: [I]Assignment #9 will be the construction of a program that reads in a sequence of numbers (not necessary integers) from standard input until 0 is read, and store them in an array (including …

Member Avatar for kramerd
0
495
Member Avatar for biggie_011

Hi Guys, I'm trying to have the user enter an integer than an outline of a pyramid would be printed on the console. I just can't get the last line to print out with "*" all across. So say a user enters 5 I need the output to be: [CODE] …

Member Avatar for apines
0
122
Member Avatar for Roy1287

Hi. I'm new to this forum and to programming in general. This is my first programming class and it is in JAVA. I have been doing alright in the class, but am really struggling with this weeks program assignment. If you could help me out at all I would really …

Member Avatar for kramerd
0
823
Member Avatar for lu25

write a public class called IfElseDemo. Create a Method called go [I][B]that takes the args String array from the main method[/B][/I]. in that method create an if/else block that looks at the first element of the array and uses the string equals method to determine the output. if it contains …

Member Avatar for coil
0
132
Member Avatar for DallasFan3

Well I am now starting a new program and it evolves get the users height, weight, age and then calculating it into hat, waist, jacket sizes. I have to have four made methods in it also. One for each clothing size and on for asking the user if they want …

Member Avatar for Eric Cute
0
2K
Member Avatar for javajavajava

Hi, I need help in creating a never ending array using java. It should basically work like and ArrayList but should be done using arrays.

Member Avatar for Eric Cute
0
215
Member Avatar for ceyesuma

Hello. I have been reading some stuff on the action command pattern. ever heard of it? More inportantly, Do you understand it? Because I do not. although I would like to ask if the following class could use the command pattern as aposed to 'if" or "switch" statements. I understand …

Member Avatar for ceyesuma
0
118
Member Avatar for Judas543

To code pretty much makes a grid of a check board. However I want to modify it so if I click on any cell of the grid of the checkerboard it will display a red circle. If I click on a cell that already has a circle, it will remove …

Member Avatar for hanvyj
0
132
Member Avatar for CLina

Hello everybody! I have to Questions to ask please: 1) How can I find the maximum value in a single linked-list recursively? this is what I tried to do: int findMax(int key){ Node max=head; while (max != null){ if (max < max.getKey()) return(max.getNext()); } } it ends up to an …

Member Avatar for CLina
0
5K
Member Avatar for coco24

The task is to be able to move the alien right, down, and left. So far all i can get the alien to do is move right and down. I need to get it to be able to move left. Can you help me please? import java.awt.Graphics; import java.awt.Image; /** …

Member Avatar for lee.j.baxter
0
399
Member Avatar for sciprog1

Hello Members, Can anyone recommend any easy-to-use and free Java Script IDEs? Thank you!! sciprog1

Member Avatar for apines
0
93
Member Avatar for ssubnel

Tell me if this makes sense structurally. I have a final this week and this homework will not be graded till after the final. I was just curious if I have as firm a grasp on this as I think I do. [CODE]public class account { private int id = …

Member Avatar for ssubnel
0
120

The End.