2,777 Posted Topics
Re: Please explain what the problem is. If you are getting errors, copy and paste the full text of the messages here. | |
Re: If you need help with translating from your language to English, try using the Google translator. | |
Re: Can you explain the problem a bit more. Is it: You have an array of x items and want to move the items left or right n slots, wrapping around from the end back to the start of the array. Have you tried working out the logic for how to … | |
Re: Can you explain? What kind of page? Where is it displayed? How is it refreshed? Some code would help. | |
Re: Change the method to return a list or array of the values you want. Each element in the list would be for one year. | |
Re: Can you explain what your problem is? Show the program's output and explain where its wrong and what you want to change it. Do you have any notes or a design on how you are going to solve the problem? Or some pseudo code? | |
Re: Change your code to start a new thread to do the long running task on its own thread, not on Swing's GUI thread. When that task ends, have it do the setVisible(false) | |
Re: char values returned by charAt() are convertable to ints and can be used in a switch statement. With an ugly nested bunch of switch statements you can parse the card's value. Can you use methods for example to get the suit name? | |
Re: Can you describe your problem? What does the program do that you don't like or what do you want the program to do that it does not do? | |
Re: [QUOTE] how can i introduce multiple panels in the same frame[/QUOTE] Look at how to use layout managers. | |
Re: Your wasting a lot of time by not posting your problem directly. | |
Re: Do you have a linux system available? Compile and test your code there to see what works. Let us know how you do. | |
Re: What is the command line you are using to execute the program? What directory are you in when you execute that command. You should be in the folder that contains the admins folder and the command should be: java admins.admins Because your class is in the package: admins | |
Re: Please explain what you want to happen when you catch an exception. Your code throws another exception which will go to the next exception handler. One way to handle this is to have a while loop surrounding the try/catch block that uses a boolean to keep it looping. If you … | |
Re: [QUOTE]after declaring the variable 'i as final' the code runs just fine[/QUOTE] Your code doesn't show a variable: 'i'? | |
Re: You need to figure out your logic using something like a flowchart on a piece of paper. Or try pseudo code. Once you get your logic worked out, then worry how to implement your logic. Can you do your comparisons as the numbers are entered or must you wait until … | |
Re: The condition of the if statement is enclosed in parans. If you have more than one condition they ALL must be within the [B]one[/B] enclosing pair of parans. | |
Re: Do you have any specific questions (other than a general request for someone to write your code)? Can you give us some pseudo code that shows what you want the logic of the program to be? | |
Re: How do you start it? Is there a way you can issue the start command in a command prompt window so that error messages are left displayed when the start fails? Open a command prompt window and change directory to the folder with the start file. To verify the environment … | |
Re: Make sure the variable: newSubscriber is in scope for where you are referencing it. It looks like the variable is defined in local code that will go out of scope when the local code ends. Local code is within {}. Define the variable at the class level and give it … | |
Re: Does your code produce what you want? If not post its output and explain what you'd like to change. Can you explain your algorithm for generating the output from the input? I don't see any pattern for getting the output from the input. Could you make a small self contained … | |
| |
Re: [QUOTE]i know i need to post properly using [code] (block codes)[/QUOTE] If you know that, why post code without them? Why don't you edit your post and add them. [QUOTE]what value/parameter to pass on the methods from Property class to Admin class [/QUOTE] Could you add comments to your code … | |
Re: You've left off a description of what the program is to do and what your problem is. Looking at the immediately preceding posted code, I see that some of it is missing. | |
Re: Does the "dialog box control" belong to the IDE or is it a java class? If its a java class, can you show some code and explain your problem. | |
Re: The value of a char digit is NOT equal to its decimal value representation. For example the digit: '0' has an int value of 48 base 10 or 0x30 ASCII characters representing ints need to be converted to int values by using the Integer.parseInt() method. | |
Re: [QUOTE]int v = String s;[/QUOTE] This is NOT valid syntax for an assignment statement. The values to the right of the = sign should be some kind of arithmetic expression. "String s" is not an expression. String is the name of a class. s is was defined in the previous … | |
Re: Bottom line is array indexing is zero based. The maximum index you can use is [B]one less[/B] than the size of the array. Your code tries to use an index [B]equal to[/B] the size of the array. Look at the condition in the for() loop | |
Re: What do you mean by a "form"? Is it a window? | |
Re: [QUOTE] image detection system[/QUOTE] Can you explain what you mean by "image detection"? | |
Re: Applets need permission to do most things. I guess your code is trying to access a Property and it is not allowed to. To give an applet permission you need to put it in a signed jar or make changes to the .java.policy file on the client machine. Or change … | |
Re: There are many code samples on this forum. Use Search to find them. They could use the ImageIO class to read the image from the file and the paintComponent method to draw it on the panel. | |
Re: [QUOTE]Doing so renders my calc inoperable.[/QUOTE] Can you explain what you did and what happened? Copy and paste all error messages here. Several differences between applets and apps: Applets rely on the browser to hold and display its contents. Apps use a JFrame. Applets have specific methods that a browser … | |
Re: Can you describe what it is you want your program to do? | |
Re: [QUOTE]it works but not completely[/QUOTE] Do you have any specific questions about your project? [B]Please put your code in code tags.[/B] Use the icon at upper right of input area. | |
Re: [QUOTE]the split method does not work[/QUOTE] Can you show what happened and explain why it was wrong? The split() method takes a reg expression. Try making one to skip 1 to n spaces. | |
Re: What is the program supposed to do? What problems are you having with it now? Also, please put the program source inside of code tags. Use upper right icon. | |
Re: [QUOTE]what I did wrong?[/QUOTE] Can you give us a clue as to what is right and what is wrong? Do you get an error message? Post it here. | |
Re: Please use code tags when posting your code. use the rightmost icon above the text input field. The one that says: (CODE) | |
Re: That sounds like you want to APPEND to the end of the current file. Read the API doc for the file output classes. One of the constructors takes a boolean specifying whether to append or not. | |
Re: The Scanner class is tricky to use. The last next...() method you call does not read the newline char at the end of the line. It is still in the buffer. When you call nextLine() it reads that newline character and returns an empty string. You need to "eat" this … | |
Re: Describe in more detail what you want your app to do? Is it client and server stuff where you write both sides? Or is there an existing server that you want to connect to? | |
Re: [QUOTE]when i press the button(1) it will appear on the screen[/QUOTE] Can you explain where the button is and what "it" is? And where/what the screen is? Use fewer 'it's and use more full descriptions. | |
Re: I don't see how you can get a NPE at the line of code you show. Are you sure that the code you posted is what you are executing? Compile it again and try to execute it again. | |
Re: [QUOTE]how to get it without the errors[/QUOTE] I don't see where you posted the errors. | |
Re: [CODE]int[] array = new int[11]; //it takes numbers 0 - 99[/CODE] Your comment here doesn't match the size of the array I don't see any logic for the range of numbers you talk about: 1-30, 31-60 & 61-99 [QUOTE]array [ 0 ] = num;[/QUOTE] This always stores num at the … | |
Re: Is this a question or an advertisement? | |
Re: Do you have any specific questions, like how to code in java to do something? Or what is this error? | |
Re: [QUOTE]how to extract the last letter from a string[/QUOTE] If you know how long the string is, you could get the character at its end by using the methods available in the String class. |
The End.