32,204 Topics
| |
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 … | |
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..!! | |
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. … | |
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" … | |
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[]){ … | |
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); … | |
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? | |
[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, … | |
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 | |
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] | |
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. | |
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... | |
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. | |
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 … | |
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 … | |
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 … | |
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. | |
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 … | |
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" … | |
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 … | |
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 … | |
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 … | |
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. | |
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 … | |
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 … | |
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. | |
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. … | |
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 … | |
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 … | |
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 … |
The End.