- Strength to Increase Rep
- +10
- Strength to Decrease Rep
- -2
- Upvotes Received
- 51
- Posts with Upvotes
- 49
- Upvoting Members
- 33
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
- Interests
- algorithms, music
- PC Specs
- E5200,Eizo FlexScan T57S,NetBeans IDE Win.XP
Hi! I'm trying to improve a code shown below. My idea is to add multiple images to JPanel. It sounds like an easy task, but all my attempts failed so far. I tried to create [ICODE]Image image2 = getToolkit().getImage(Drag1.class.getResource("cross_cursor.gif"));[/ICODE] and then [ICODE]bi2 = new BufferedImage(image2.getWidth(this), image2.getHeight(this)...);[/ICODE]. But I can see … |
|
Hi. I'm trying to create a Traffic simulator and I'm stuck on how to get a Car object to turn into a road. I've managed to have a car go straight (which is really easy anyway lol) but I can't really find a way to get it to turn into … |
|
Hey I just found this site because I have been working on a program to make answer and create questions to the game 24. (24 is a game where players are given 4 numbers and by either adding, subtracting, multiplying and Dividing the given numbers the number at the end … |
|
Ok, before everyone gets mad at me for not looking around the board for these topics, I have, but they weren't my problem. My problem I am having is calling the Polynomial class. I know how to call classes in a different class, but this is a bit different. I … |
|
I'm making a paddle and ball game, a bit like pong but instead of another paddle im using the top of the frame, plan to make it into a football sort of game eventually with a bit of work, I have been able to add the ball to the frame … |
|
i have to store msgs of string type in a file in java.how do i distinguish between 2 msgs.and how shud i delete the first msg in the file. for eg: "My name is abc.I am fbvnfdl.I am a girl." is stored in a file. and "My name is abc.I … |
|
I wanted to create this program which lets the user choose from the 4 number systems, binary,decimal,hexadecimal, and octal. inputs a number for the chosen number system, then converts it to the other three number systems. Help anyone? |
|
Hi - I am a newbie - so I hate to ask for help, but your site has been so useful even before I joined, so I hope you will have pity on me. I am doing a java program using 2D arrays. It covers 4 quarters of sales across … |
|
I am over my head in my current class and could use help or pointers changing the program I have written. It is a mortgage calculator and I have to modify it. My class texts seem over my head and I have to drive 20 minutes and use public internet … |
|
I want combo box in jtable visible from start not when i click the cell... any idea? |
|
I read some of the threads on calculators, but couldn't find anything related with what I need. We have this swing calculator project, that uses buttons and/or a textbox for input, and a different textbox for output. I have done most of it, and is working ok. The problem I … |
|
I have two JSliders that are both going to a common stateChanged Method, but I am having trouble separating them. I assumes they were somewhat like separating something in the actionPerformed method, but it doesn't seem to work. it does however go into the method, it is just the if … |
|
Can Someone please help i need to create a GUI out of this code for 24hours from now. Can someone please send me the code to create this gui. Its all coded in notepad. Thanks |
|
This is just a small snippet of my program but it's a gui and the criteria is when the Open option comes up the user can select a text file that contains the data that is going to be loaded into the JTable. My code only places the first line … |
|
This is program that return a concatenated string to the main() [CODE] import java.io.*; class ConCat { public static void main(String args[]) { String a, b ,c; a = "Animesh "; b = "Pandey"; c = concat(a, b); System.out.println(c); } } static String concat(String s1, String s2) { String C; … |
|
Hi ,I want to go back after the else to the if statement(step2),how can I do it [CODE]public class main { public static void main(String[] args) { gcd(12,23); } public static void gcd(int m,int n){ int uPrime=1; int vPrime=0; int u=0; int v=1; int mPrime=m; int nPrime=n; int counter=0; if(mPrime%nPrime==0)//step2 … |
|
hey i am new here i am working on a school project where i am building an applet.. i have encountered a problem i cant solve, i have 2 classes... the first class i very simple it has to methods which return an string array for table column and Object … |
|
hi! i found problem in using timers.... do anyone help me in this regard as i have no idea about it...... please.... i am sending a code which i tried but in vain. i know where the problem arises.... but cannot find any solution of solving the problem..... [CODE] package … |
|
Hello friends, Forgive me If I am posting this on a wrong Section. I am developing an application in Android. In that I need to compare a Audio file with the Audio input(Singing Voice input) and tell that whether that is same song or not. So I dont know which … |
|
I'm trying to create a class that calculates for the next possible coordinate for a Bishop Piece for my chess program and I encountered this problem. I used a JOptionPane to test for the results and I can't understand how it got that result. The first JOptionPane shows false because … |
|
Hey guys I have been having lots of problems getting my animation to not flicker. I have read that double buffering is a good way to stop the flickering but everything I have tried doesn't do anything to help. If you could please help me understand what I am doing … |
|
I am trying to build a compiler using Java Code. I am stuck at the Lexical Analyzer Stage and am not getting the output I want. The Code: 1)Lexical Analyzer [CODE] public class LexicalAnalyzer { int lexemebegin; int state; Symbol tokenValue; TokenType currentTokenType; String Shura; int lineNumber; int position=-1; String … |
|
[QUOTE] I want to do convolve operation on an image using java. But the program shows a runtime error like cannot do Convolve operation on the image. I am attaching the code I have done. Please help... [/QUOTE] [CODE] import java.awt.image.*; public class ImageOperations { private BufferedImage image, blurredImage = … |
|
Hello everyone, I am trying to get an ActionListener to work in Java. On lines 310 and 312 it says 'cannot find symbol: variable calcDisplayF'. I am a complete noob when it comes to Event Handling so any help on this subject would be greatly appreciated. Here is the code … |
|
Correct Sequence of brackets is always of primary importance both for written programs and mathematical expressions. By correct sequence we mean that for every opening bracket there is a closing bracket. The problem is to write a program that takes a random sized (size max 15) input of brackets from … |
|
here is my code: [CODE]//if any of errprLists is not equal to 0, then initialWieght equals newWeight if(errorList[0]!=0 || errorList[1]!=0 || errorList[2]!=0 || errorList[3]!=0) { for(int i=0; i<row; i++) { initialWeight[i] = newWeight[i]; } } //break the loop if all errors equal 0 //--------------------------------------------------------------------------- else if(errorList[0]==0 && errorList[1]==0 && errorList[2]==0 … |
|
I am new here and didn't do well on a problem in school and was wondering what i did wrong! PROBLEM: Create a Book class that stores book information. Your Book class will store the following: •book title •author’s first name •author’s last name •book ISBN-10 number •publisher •price Create … |
|
So the assignment is to make a Rock Paper Scissors Spock Lizard Player that plays against another student's player without using any Random generation for 100000 trials. We are supposed to be able to detect the patterns/sequences in the other player by storing their past moves and looking for any … |
|
Hello, I'm trying to create an application that when you click on a button, it just displays a string but it doesnt work. Here's the code: [code] import java.io.*; import java.awt.*; import java.applet.Applet; import java.awt.Graphics; import java.awt.event.*; public class main extends Applet { TextField input; Button convert; public void init … |