32,204 Topics
| |
Hello. I'm having troubles with my JComboBox calculations. For example, if the strings in my JComboBox were String[] name = { "John", "Tom" }; And Tom was assigned 15% to his name. How can I have the cases in my action performed reach out to a calculation class to perform … | |
I have a Pong game with a level editor (as long as you have the source code) where you can put walls where you want. There are also walls that only balls hit by the player can pass through, walls that only balls hit by the Cpu can pass through, … | |
Ok, I'm stumped and asking for a push. I need help adding an instance variable for my timer in my frame class. After that I need to : Instantiate your timer. Pass in the initial time (in seconds) and a reference to your timer display JTextField object. This can be … | |
I'm new to Swing, and still relatively new to Java as a whole, and am having trouble with my first Swing program. I'm trying to make a simple Pong game - it will display the title screen with a "Play" button on it that when pressed starts the game. Here … | |
Problem Math Input File: MathIn.txt Output File: MathOut.txt Project File: Math Mathematicians on the planet Earth, write math expressions using in-fixed notation. In this notation, math operators are written between the operands they operate on (e.g., 2 + 3). On Mars, math strings are written in post-fixed form. In this … | |
I have to write a program that asks the user to input a positive integer. It should than output a message indicating whether the number is a prime number. | |
[code] import java.io.*; import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.util.Random; public class snake1 { public static void main(String args[]) { String name1= JOptionPane.showInputDialog("Enter Player one's name"); Windows myW=new Windows(name1); myW.setSize(800,600); myW.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent event) { System.exit(0); } }); myW.show(); while(true) { myW.repaint(); try{Thread.sleep(60/myW.getLevel());}catch(Exception e){} } } … | |
This is for an assignment, I'm not asking for answer answers/code to help me out but a point in the right direction would help me greatly. I have approximately 250 lines of data (olypics data) that I want to load into a constructor and then make an array of said … | |
I am adding functionality to a tutorial which is a JDesktopApplication(Netbeans6.1)using Entity class from databases with Persistence unit and entitymanager. I have components in place. Can someone help me find out if there is a bean that fires the actionperformed methods? Ican't figure out were it is. I need to … | |
I'm looking for a javadoc script that would automatically generate a javadoc website and update the SVN with it, but I can't find one anywhere, so does anyone know where I can get one? A simple script that runs javadoc would do just as well, because from what I understand, … | |
[COLOR="Green"]This case, [/COLOR] [CODE]case 18302: if (playerLevel[19] <= 1) { guard(); addSkillXP(19, 50); isNpc = true; updateRequired = true; appearanceUpdateRequired = true; else if (playerLevel[19] >= 1) { sendMessage("You need a shapeshifting level of 1 to do this."); } break;[/CODE] [COLOR="Green"]I made it by myself, and it gives 100 errors, … | |
I have some webspace that I used so far for university assegnments. I would like to to convert it to blog website where I will place some rants, codes and some maybe for somebody interesting info that I find along the research path of my MSc project. Website will be … | |
Ok well apart from a little inconvenience, my program runs almost flawlessly given the guidelines of the assignment. I'll tell my problem first and right after paste my code: When you type in the sentence to be analyzed, only the punctuation mark at the very end doesn't get counted towards … | |
Hello I'd like to create a hover effect for JButtons, but i can't find it for the moment. It doesn't have to be antything spectacular, it just has to be visible. Thanks in advance. Greets, K?!. | |
I made a simple program in which will connect to ms sql... then, after running the codes something is error! can you help me to solve this out... here is my code: import java.sql.*; public class connect_sql { public static void main(String args[]) { Connection con = null; try { … | |
I'm trying to write a program that first decides if a number is prime, and if it is writes it to a file I created. I'm obviously having problems (or I wouldn't be pulling my hair out and posting this). First, the errors say an identifier expected after the "public … | |
I'm suppose to create a problem that displays the contents of a file (that the user inputs), and then displays each line with a number in front and a colon after it. So, line 1 and 2 would print out: 1 lineFromFile : 2 lineFromFile : But, it keeps printing … | |
hi i received one error when i run jsp page with custom control.the error is cannot find setter method for the attribute <attribute name> of the tag handler <tag handler name> my pgm is. private String dfontSize="12"; public void setDfontSize(String dfontSize) { this.dfontSize = dfontSize; } out.print("<SPAN STYLE=\"" + "font-size: … | |
Basically, I have to make a code that requests user input. The program asks them to tell me how many columns/rows the user wants the magic square to have. I need to then generate random numbers for each spot. ex: user inputs 3, out put looks like 3 7 1 … | |
[B][I]I've designed a simple applet that works fine on My Windows Xp but when I upload it on my webhost server or run it through any server for e.g. Tomcat It shows the following error in Java Console but no error without server [/I][/B] [B]Java Plug-in 1.6.0_02 Using JRE version … | |
Im hoping this is just simple, but I have a main class for my GUI and I do some printing in another class called board, which gets its information from my peg class, which gets its information from my linked list. Is there and easy way to print my pegs … | |
Hello, i am new java beginner and have some problems when i try to add "ListeningPoint" in mye class. I got some error massege like this, but can not fix it: <identifier> expected [javac] myListeningPoint = sipStack.createListeningPoint(port, "udp"); [javac] ^ [javac] 1 error can you please help me ?? Here … | |
I wrote the following code, and it seems to be working well up until the end. I do not get any error messages, but the last method has 5 lines that are supposed to print out. Nothing prints. Any ideas? Hints? Clues? Thanks! public class paintJobEstimator { public static void … | |
Now this is an assignment for me, but ive spent the last two weeks writing this code day and night, I just cant get it out of my head, I have to beat it lol. So anyway, two days ago I won and completed my program exactly the way I … | |
Hello. I now know how to allow the user to enter only numeric input in a FormattedTextField. What I need help with now is how to allow the user to only input letters. An example is what I have below. The problem I keep getting is it won't allow me … | |
Just got one more question. I tested in my java JMF program just now. I found that AVI format are not supported by JMF. and also wmv,wma; who can help me? thank you!!! | |
[code] String like=searchJTextField1.getText(); query=entityManager.createQuery("SELECT c FROM content c WHERE c.artist LIKE \"%" + like + "%\""); query.setParameter(like, searchJTextField1.getText()); [/code] is there someone that could tell me if this code is right? thanks -Steve | |
I have a very specific question. For one particular handset I'm using, playing a http stream, each time the player closes, there is a considerable delay i.e. 2 seconds, this is unacceptable as the music is not smooth. Does anyone one know of a way to improve the efficiency of … | |
If netbeans ide has a queryproperty set to SELECT c FROM Content c How can I change this query to say ..limit the resultset to less records like 10 or 20 instead of the whole database. I am not sure what that SQL string would look like. | |
Do you have some understanding of the netbeans6.0 concerning binding and queries? I have a jdesktop program from a tutorial using the netbeans ide. it automaticlally sets the query property to [icode]SELECT c FROM Content c[/icode] (which is somewhat foreign to me) however; I'd like to have another example of … |
The End.