32,204 Topics

Member Avatar for
Member Avatar for NormR1

Is there an easy to use tool that OPs could use to find variable's whose class level definitions are Shadowed by local definitions of variables with the same name. I see that problem a couple of times a week. Do the standard IDEs have options that would warn about the …

Member Avatar for ~s.o.s~
0
179
Member Avatar for Narayanan87

Hi, Am setting a value in request objet like this: [icode]request.setAtttribute("Hello","true");[/icode] Now i am redirecting to the action class: [icode]new RedirectingActionForward(request, url.getInwardRedirectURL());[/icode] In the redirected action class, am using this to retrieve value from request object: [icode]String example = request.getAttribute("hello").toString();[/icode] Am getting nullpointerexception.. Could anyone help me on this..!!

Member Avatar for stevanity
0
143
Member Avatar for J-Dub

I am trying to build an animation. It just has two pictures or scenes. I want it to start at one picture and end at another. When I run my project all I see is a blank screen. I have checked and made sure that my Image paths are correct. …

Member Avatar for J-Dub
0
188
Member Avatar for hessian26

Hi, I am new to Java and just learning GUI's. I was wondering if someone could help me with a project? I am trying to create a questionnaire. It will was the user a question and have radio button answers. After the answer is selected, they will hit the "next" …

Member Avatar for mKorbel
0
181
Member Avatar for ilovejava

An emirp (prime spelled backwards) is a prime number that results in a different prime when its digits are reversed.[1] This definition excludes the related palindromic primes. Emirps are also called reversible primes. this are the list of emirps [url]http://oeis.org/A006567/list[/url] [CODE] public class EmirpProgram { public static void main(String args[]){ …

Member Avatar for NormR1
0
396
Member Avatar for winecoding

I happen to read the following code segment from Thinking in Java [CODE]public class PetCount3 { static class PetCounter extends LinkedHashMap<Class<? extends Pet>,Integer> { public PetCounter() { super(MapData.map(LiteralPetCreator.allTypes, 0)); } public void count(Pet pet) { // Class.isInstance() eliminates instanceofs: for(Map.Entry<Class<? extends Pet>,Integer> pair : entrySet()) if(pair.getKey().isInstance(pet)) put(pair.getKey(), pair.getValue() + 1); …

Member Avatar for JamesCherrill
0
164
Member Avatar for jayyzhao

Hi Guys, I have a entry that uses keyboard.nextInt() is there a way to limit what it accepts and if its not right return a text string? I have tried using If and else statements for some reason they don't seem to be working. Any ideas?

Member Avatar for NormR1
0
59
Member Avatar for ferretfool0x77

[CODE]try { dataFile = args[0]; } catch (Exception e) { System.out.println("The file was not found. Please input file name now: "); dataFile = scan.nextLine(); }[/CODE] This gets a file name from the command line, and if no file is specified it asks the user to input a file name, however, …

Member Avatar for skoiloth
0
237
Member Avatar for gedas

hey guys i need java code that would convert .csv files to .xls. has anyone got any examples or anything similar? any help will be appreciated. thanks

Member Avatar for katarey
0
76
Member Avatar for gunjannigam

I am attaching my complete code, which I was currently developing. I am not able to get why doesn't my KeyListener work. None of the KeyListener events are fires on pressing the keyboard. Please have a look and tell me the flaws in my code [ATTACH]22414[/ATTACH]

Member Avatar for gunjannigam
0
7K
Member Avatar for coco24

Hi, im trying to move an object that moves only with the user input. For example if i type in 45, it will move 45 spaces. How would I go about doing that? Thank you for your time.

Member Avatar for JamesCherrill
0
79
Member Avatar for w0ot28

please help me... i will make Family Feud game in java... i dont know how will i start my project... T_T.. please help... give me some ideas... please...

Member Avatar for javaAddict
0
175
Member Avatar for perlsu

Can anyone help me to get the estimate value of float value 1001.27124 to 1001.27? Math.round(float) function return the int value. But I want to get float value result with 2 decimal point; Thanks in advance.

Member Avatar for mubin_89
1
4K
Member Avatar for m1n1m3

Hi ! To improve my java programming skills i like to write a really fancy fib. nr. calculator. Did it in C using memory allocation methods and hot to 1M digits in ~10min. So something like Step-Up challenge. The only thing as far as i can see limits my progress …

Member Avatar for NormR1
0
214
Member Avatar for aanders5

Trying to read a list of numbers in from the arraylist, and stick em into a matrix of int[][] int[][] board; board = new int[row][col]; ArrayList<Integer> temp = new ArrayList<Integer>(); so those are my two variables, and i have a for loop with variables, i and j...so I am trying …

Member Avatar for aanders5
0
359
Member Avatar for kweigand

First off, I am a Java Noob coding in latest version of NetBeans. I am trying to create a program the will allow the user to enter two decimal values: time and earnings in a swing GUI. [B]Basic Flow[/B] [LIST=1] [*]The user will enter the values in two different text …

Member Avatar for kweigand
0
172
Member Avatar for haripriyamca05

hai guys, see for example i have 15 banks details to print as pdf. but i wanted it to be printed only 6 banks per page. i have to get 3 pages for this 15 banks as 1-6 , 6-12, 12-15 respectively. Give me the suggestions to do it.

Member Avatar for Ezzaral
0
65
Member Avatar for neeraj goswami

i am writing one java code in notecode.once i am compling the code in command prompt it is showing the following error: javac is not recognised as an internal or external command ,operable program or batch file. what does this mean?..i am using jre7 java version.i have also specified the …

Member Avatar for NormR1
0
119
Member Avatar for sohiabmaroof

hi all m having problem deleting table row from button in jtable .here is my error when i press on delete button this code is similar to my original code . please i need immediate feedback m stuck in this error from days.this is the error [code]Exception in thread "AWT-EventQueue-0" …

Member Avatar for sohiabmaroof
0
2K
Member Avatar for tehhax0r

I have an assignment for a class i'm having trouble with heres the prompt: Research reports are required to conform to a given standard (e.g., APA, MLA). These standards specify rules such as the size of the margins, formats for titles, paragraphs, references, page numbers, etc. Consider a program that …

0
93
Member Avatar for houghton220

Hello: We get the following message when we boot up our Windows Vista laptop, along with it popping up at any time at all when we are using the computer. This is what it says: Java Virtual Machine Launcher Could not find the main class:com.anabel.pp.JettyPersonalizationServerMain.Program will exit. Any help in …

Member Avatar for houghton220
0
325
Member Avatar for java.util

Hello, I have written a program for an assignment and all was working well, I tested everything and all that was left was to put in a few error-messages. Then, I changed the format from ISO to utf-8 and when I tried to run it again it suddenly stops at …

Member Avatar for javaAddict
0
1K
Member Avatar for Majestics

I want to create MouseListener library from scracth... Its just a assignement ... I have no idea to develop a thing in which i cant use that api directly from java... Please Help.

Member Avatar for Majestics
0
113
Member Avatar for Duki

When I debug this method, I can clearly see that currentNode = Workstation, so I am puzzled as to why I'm still entering into the "Node" buffer print, rather than the "Workstation" buffer print. Shouldn't polymorphism handle this for me?: part of Node Class [code=java] public void printToBufferAsHTML(Network network, StringBuffer …

Member Avatar for Duki
0
118
Member Avatar for TigerTeck

objective: Write a class Bug that models a bug moving along a horizontal line. The bug moves either to the right of to the left. Initially, the bug moves to the right, but it can turn to change its direction. Provide a constructor. All methods are included below. [CODE] public …

Member Avatar for mrjillberth
0
120
Member Avatar for Majestics

how to move a jframe which has no taskbar? [code] frame.addmousemotionlistener(this); public void mousedragged(MouseEvent e) { // What to write here } [/code] I tried setBounds of jframe but it flicker when we try to move the frame.

Member Avatar for Kyberium
1
270
Member Avatar for nickh2o

need help to making change I have read textbook a lot but i still dont know what to do next steps. Here is problem. The program should prompt the user for and accept two inputs: 1. The price (including any applicable tax, etc.) for whatever was purchased by the customer. …

Member Avatar for nickh2o
0
6K
Member Avatar for sirlink99

I am trying to do basic animations with images, and I am wondering how I could get a smaller image from a larger one without going through and editing it. I made a sprite [URL="http://translate.google.com/translate?hl=en&u=http%3A%2F%2Fwww.famitsu.com%2Ffreegame%2Ftool%2Fchibi%2Findex1.html"]here[/URL] and downloaded the image. As you see in the thumbnail the animation is from all …

Member Avatar for sirlink99
0
264
Member Avatar for sirlink99

I am taking data management this year, and we are currently learning about matrixes. I know they are used to encrypt things, and the teacher even used it as an example. my problem is the following. We are only learning how to encrypt and decrypt using a 2x2 matrix. That …

Member Avatar for Ezzaral
0
112
Member Avatar for SasseMan

Hello! I've made a custom JPanel that overrides paintComponent which paints a rounded rectangle. My problem is that when I place other components in the panel, like a JLabel, they don't get rounded corners like the panel they are in. here is my panel class: [code] private static class BackgroundPanel …

Member Avatar for mKorbel
0
5K

The End.