Search:

Type: Posts; User: Blasfemmy

Page 1 of 2 1 2

Search: Search took 0.18 seconds.

  1. Replies
    17
    Views
    522

    Re: JLabel/ComboBox Issues

    Oh, I see! I didn't even think of that! So instead of having one comboBox/Label for each array, have one for each position and modify the contents as needed.
  2. Thread: jsp

    by Blasfemmy
    Replies
    3
    Views
    147

    Re: jsp

    What errors are thrown? Also, can you format your code so that it is easier to read(i.e. tab things over, comment things out, etc.)?

    --- Update ---

    And use the code tags when posting chunks of...
  3. Replies
    17
    Views
    522

    Re: JLabel/ComboBox Issues

    This is where my problem was originating from though. I don't want it to add them to them bottom, but to overwrite them, to have them put in the same spot where the previous one was. For example,...
  4. [SOLVED] Re: Would you use a do-while for the following....?

    Your error lies here: It should be
    if(number != -99) { Keep in mind that the user needs to be continuously prompted (loop) with the questions for entering a number. What this does is ask the...
  5. [SOLVED] Re: Would you use a do-while for the following....?

    The main differences between the three loops that you described are:
    A "do-while loop" checks to see if the condition is true or false after the code is executed.
    A "while loop" checks the...
  6. [SOLVED] Re: Would you use a do-while for the following....?

    If you break the problem down into small steps, then the problem will not seem nearly as complex.

    This is going to be your loop.

    In psuedocode:
    do {
    //prompts user to enter a...
  7. [SOLVED] Re: Would you use a do-while for the following....?

    Can you post your code so that we can look over what you have already done?
    Can you elaborate upon this? What error messages are you getting?...
  8. Replies
    17
    Views
    522

    Re: JLabel/ComboBox Issues

    I'm trying to add them to an array index, but I can't seem to figure it out. I am getting an incompatible data types error, thus I presume that I am declaring them incorrectly.

    I added the...
  9. Replies
    17
    Views
    522

    Re: JLabel/ComboBox Issues

    Ahh, I see, it is working nicely!

    Here is that updated snippet:


    super("Athletic Trainer Sign In");
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    setLayout (new GridLayout(8,2)); ...
  10. Thread: for Jbutton

    by Blasfemmy
    Replies
    2
    Views
    136

    Re: for Jbutton

    What do you have done thus far? Can you be more specific? No one on here is going to write your program for you, the forum section is called "What's Wrong With My Code," not "Write My Program."
  11. Replies
    17
    Views
    522

    Re: JLabel/ComboBox Issues

    Okay, so I cleaned up the code a bit, and was able to make the JComboBox disappear when not selected.


    I figured that it couldn't hurt if I added it to prevent a compiler error, because at that...
  12. Replies
    17
    Views
    522

    Re: JLabel/ComboBox Issues

    Yeah, I was planning on cleaning up the code a bit and worrying about the layout later, once I got these few program-breaking errors fixed.



    Hmm, would I be able to assign something like
    ...
  13. Replies
    17
    Views
    522

    Re: JLabel/ComboBox Issues

    I my thinking was that the initialization of the JComboBoxes are based off of the value of the selectedValue, thus while it is selected, then it is initialized, and when it is not selected, it...
  14. Replies
    17
    Views
    522

    Re: JLabel/ComboBox Issues

    Okay, when the program runs, there is a JComboBox that contains the bodyPart array. What it is supposed to do is when one of the items in the JComboBox are selected, it makes another JComboBox...
  15. Replies
    17
    Views
    522

    JLabel/ComboBox Issues

    Greetings! I am having some trouble with JLabel.

    This is a Sign In program for my high school's athletic trainer that I am writing. When it first runs, it should display an empty text field...
  16. Thread: Array Issue

    by Blasfemmy
    Replies
    2
    Views
    371

    [SOLVED] Re: Array Issue

    I'm very new to arrays, which is why I made a mistake like this, thanks for the help!

    After fixing that, these are the errors that are left:


    I don't understand these errors. I thought that...
  17. Thread: Array Issue

    by Blasfemmy
    Replies
    2
    Views
    371

    [SOLVED] Array Issue

    I need some assistance with debugging my code.

    Here are my objectives for this program:
    -Randomly input 20 numbers from 1 to 10 into a 2D array of 5 rows and 4 columns
    -Output: the 2D array and...
  18. Replies
    24
    Views
    473

    [SOLVED] Re: Help with Methods

    Sorry about not using the code=java. I think now that I have a better grip on the syntax for java, progressing forward will be a lot easier. For some reason this concept just wasn't clicking. ...
  19. Replies
    24
    Views
    473

    [SOLVED] Re: Help with Methods

    With this update, I was able to use If-Else statements to check to make sure that the user does not input more hours than there are in a week (168). At the moment, it exits the program. How would I...
  20. Replies
    24
    Views
    473

    [SOLVED] Re: Help with Methods

    Great idea!

    Is this what you were referring to? With this I am able to simply delete the variable listed under "setAllVariables" and it won't be included in the execution of the program.


    ...
  21. Replies
    24
    Views
    473

    [SOLVED] Re: Help with Methods

    I think I finally understand this concept! Here is what I have:




    import java.util.Scanner;

    public class Modification_of_3_4 {

    public static void main(String[] args) {
  22. Replies
    24
    Views
    473

    [SOLVED] Re: Help with Methods

    Okay, the first time running it, it outputs "Hello World" as expected. The second time it outputs "null null", is this because the "String" is conflicting with the "void" in the header, thus making...
  23. Replies
    24
    Views
    473

    [SOLVED] Re: Help with Methods

    I tried again to get it to return a value, this time looking a lot closer at the example and still can't get a return value:




    import java.util.Scanner; //Takes user input
    import java.text.*;...
  24. Replies
    24
    Views
    473

    [SOLVED] Re: Help with Methods

    Okay, that made a lot of sense! How can I set it so it actually returns a value? Would I have to declare a new variable and set what value is returned equal to that variable?

    Here is my attempt:...
  25. Replies
    24
    Views
    473

    [SOLVED] Re: Help with Methods

    I'm still confused on how this works >< I can't take a break from code writing, this is a project due tomorrow, and I've been trying to figure this out for almost a week now. Looking at the posted...
Results 1 to 25 of 35
Page 1 of 2 1 2