2,777 Posted Topics
Re: Is this the same problem? http://www.daniweb.com/software-development/java/threads/432580/drawing-indented-line#post1855318 | |
Re: Try asking on a Javascript forum. This one is for Java. | |
Re: Take a look at the tutorial: http://docs.oracle.com/javase/tutorial/reallybigindex.html There are lots of example programs there. Start with: http://docs.oracle.com/javase/tutorial/getStarted/cupojava/index.html | |
Re: Can you make a small program that compiles, executes and tries to do what you want done? SOmething that we can use for testing. | |
Re: > I don't know if it's assigned in str1 or str2. Add some printlns to print out the values of those two variables after they are read in so you can see what their values are. Be sure to put ID strings with the println so you know what variable … | |
Re: > Am I doing the right thing for my ouput Does your program print out what you want printed? | |
Re: Are you talking about serializing the object into a ByteArrayOutputStream? | |
Re: Can you explain what you are trying to do? Do you want to wait after a certain event happens? or do you want to wait and then create an event? | |
Re: Is this the same question: http://www.daniweb.com/software-development/java/threads/431973/help-solve-this-code-problem Why didn't you reply to the posts on that thread? | |
Re: Could you include the import statements so the code will compile? Also I don't see a main() method for testing the code. | |
Re: Can you give an example of a hex String and what int value you want to get from it? An int holds 32 bits which can be represented with 8 hex digits. The example hex String you posted is longer than 8 digits and would not fit in an int. … | |
Re: The code compiles for me (after I fix a comment on line 50) Do you have another Date class defined on your PC? > EmployeeTest.java:30: incompactible types What compiler are you using? I've never seen this error before. It's best to copy and paste error messages and not type them … | |
Re: If you have a java programming question, please post your code and the questions you have about it. If you are getting errors, please post the code and the full text of the error messages. | |
Re: > It is giving the errror Please copy and post the full text of the error message. Not sure what "rule" you are talking about. There is a rule that the class that you start the program execution with using the java command must have a main() method. | |
Re: Which part of the project are you having problems with? Pick one part and ask questions about your problems. Then work on it, get it to compile, execute and test OK and move to the next part. First thing I see is that the code is not in a class … | |
Re: Also look at the Error stream for error messages. | |
Re: Can you edit the code and give it proper indentations and formatting? Nested statements should be indented 3-4 spaces and should not all start in the first column. Proper formatting makes it a lot easier to read and understand code. > the test program but never allows me to input … | |
Re: Can you post the program's output that shows the problem? When printing out data, it helps to add an id String that describes what the value is. For example: System.out.println("avg="+avg) Where does the program add up the total you want to display? You should display it outside the loop after … | |
Re: Can you make a complete program that compiles, executes and shows the problem? Also please post the output from the program that shows the problem. Have you tried debugging the code by adding some println statements to show the values of variables as they are changed and looked at? You … | |
Re: > I want to show the BMI using JOptionPane.showMessageDialog method showing their full name and BMI.What am I doing wrong ? Can you explain what the program does that is "wrong"? | |
Re: The indexes for arrays can have values from 0 to the length of the array -1. Check that the maximum value for an index is less than the length of the array. Use the .length attribute of the array to test against. Don't hard code a number: for(int i=0; i … | |
Re: Can you work on the errors one at a time? Comment out (add // in column 1) all the lines with errors on them except the first line with an error. Compile the code and copy the full text of the error message and the line with the error and … | |
Re: Are you saying that the stream parameter passed to the MyiReportViewer constructor is null? Can you look at the code that calls that method and see why? | |
Re: Are you working with Java SE on a PC or with another version of java on an Android system? | |
Re: The '+' operator is used for adding two numbers together or for concatenating two Strings. The compiler does NOT know what to do when one of the operands is type Object and gives an error message. What datatype is val? Can it be cast to a String or a number? | |
Re: What package is the Keyboard class in? I don't recognize it as part of Java SE and don't have any doc for what it does. | |
Re: It would be fairly easy to rewrite the application to run as an applet. Put the GUI and code into a panel that could be either added to a JFrame for the application or to a JApplet for the applet. Any file I/O would have to be changed. But that … | |
Re: You need to post the code you are working on and ask specific questions about the problems you are having. If you are getting errors, please post the full text of the error messages. | |
Re: Without a working example these are hard to debug unless someone has had the exact same problem. Have you tried debugging the code by adding some println() statements to show where the code is executing etc? With the threads and listeners, there could be something that is not foreseen. | |
Re: Is there a question or problem? Or are you just sharing some code? | |
Re: > is coming back errors. Can you post the full text of the error messages so the current code can be cleaned up. > can't figure this out. Can you explain where you are having problems? | |
Re: > how to associate a specific cost with a specific product, The Map class is one way to associate one value(the product id) with another (the cost). You may not be using the Map class yet, so another solution would be an array. That could work for you if the … | |
Re: Please post the full text of the compiler's error messages so we can see what it is saying. | |
Re: If you are getting errors, Please copy the full text of the message and post it here. Otherwise explain what your problem is. | |
Re: Please post the code you are having problems with. If you don't have code yet, what are your thoughts on how to solve the problem? | |
Re: What happens when you compile and execute the code? | |
Re: Some of the steps: Move the GUI components into a panel that can be added to the JApplet panel Get rid of the main() method, use the init() or start() methods Put all the resources into a jar file vs reading them from disk | |
Re: > key input be recieved by my program and later by the program it was intended for. Java can't detect events sent to other programs. | |
Re: Are you asking about executing the program in more than one JVM? On the same PC? | |
Re: Is it the byte array you want to reverse before doing the wrap? | |
Re: This is a java forum. What you posted looks like javascript. Try a javascript forum. | |
Re: Please post the code you are having problems with. | |
Re: [QUOTE]what code placed for no or cancel button...to prevent closing window..[/QUOTE] Have you looked at the setDefaultCloseOperation method? | |
Re: Have you looked at the API doc for the two classes you are using. Scan through their methods and I'm sure you will find some that do what you want. http://docs.oracle.com/javase/6/docs/api/index.html | |
Re: Do you have code for testing the problem? The posted code does not have a main() method. | |
Re: > // getting error here Please post the full text of the error message. Also post the code you use for testing. | |
Re: > how to do the loop to ask the user for the information and put it into the ArrayList. Which part are you having problems with? The loop getting the data from the user creating an object putting the object into the arraylist | |
![]() | Re: Do you have any specific questions? If you are getting error messages you need help with, post them and your questions. |
Re: To call a non-static method defined in a class, you need a reference to an instance of the class. for example, this line uses the reference variable: s to call the peek() method. > s.peek() |
The End.