Search:

Type: Posts; User: SunshineInABag

Page 1 of 3 1 2 3

Search: Search took 0.09 seconds.

  1. Re: Getting "cannot find symbol" errors when trying to pass variables between methods!

    Unfortunately, Dr.Java doesn't provide very detailed errors. Due to the line spacing, the only effective way for us to suggest how to fix your code would be to copy and paste it into an IDE.

    Your...
  2. Replies
    1
    Views
    1,830

    Re: Make JTextArea act as console?

    Your AddNumber class interacts with the console, so it doesn't matter where it is called, it will do just that. You're on the right path though for making your JTextArea resemble a console. Before...
  3. Replies
    20
    Views
    1,657

    Re: Basic GUI (eclipse swing)

    You have a variety of options for taking in user input via a GUI. I'll list out a few but keep in mind, there are others I'm not mentioning:

    1) Create a JOptionPane.showInputDialog(null,...
  4. Re: Aggravating project, need fresh eyes and help

    Are there any errors that appear? There are a few problems I see. First, in your statement, you're only specifying a table name but not the database where that table can be found. Instead, try SELECT...
  5. Re: Aggravating project, need fresh eyes and help

    When you refer to updating or deleting content, do you mean that you want the program to write (and later read) from an external file, where each student ID is on a separate line or separated by a...
  6. Replies
    12
    Views
    2,424

    Re: Calling up array methods from main

    No offence but, how is it you can write your own methods, use static, return statements and single-dimension arrays, yet don't know how to call them? Use whatever source(s) you're studying or...
  7. Re: Need help inputting and writing to a external data file.

    Since it is not entering the if-statement of if(!inputFile.exists()), the representation of the file or the file itself exists. It's now a matter of figuring out what the compiler thinks the file...
  8. Replies
    2
    Views
    1,227

    Re: && , || usage?

    This if-statement will return true if a + c > b is false OR b is divisible by 3 without a remainder. The only time it will not return true is if a + c > b is true and b is not divisible by 3.


    ...
  9. Replies
    10
    Views
    3,258

    Re: button overlapping the other button

    Most layout managers try to ensure each JComponent is side-by-side or some other arrangement other than overlapping. However, there are a few that rely on overlapping, such as CardLayout (not sure if...
  10. Re: Need help adding Displays to a program

    What have you tried to code each of the 4 additional features of a help option, setParams option, FillArray option and DisplayResults option? I'll give a very rough outline of the logic and you may...
  11. Replies
    12
    Views
    2,424

    Re: Calling up array methods from main

    Since all the methods are static, you just need to call them without creating an instance of the class and make sure you assign a variable that is of the same data type as the return (for your...
  12. Replies
    10
    Views
    3,258

    Re: button overlapping the other button

    I'm a bit confused, are you trying to get the buttons to have that overall appearance but function as 1 button OR are you trying to get 2 buttons with different functions/roles overlap each other?
    ...
  13. Replies
    6
    Views
    1,327

    Re: swing layout problems

    Can you post the code so we can see what happens or make a SSCCE? It could possibly be the layout that you have chosen. If you want to have more control over the layout, try GridBagLayout.
  14. Replies
    4
    Views
    1,984

    Re: Searching with keywords in a sentence

    Your if-statement is insanely large and impractical, especially if you want to compare more words. Instead, use another array or an arraylist, such as:



    public class TestSentence {
    public...
  15. Replies
    1
    Views
    1,428

    Multidimensional array uses

    Multidimensional arrays can have any number of dimensions to them, from int[][] to int[][][][]. I understand how a multidimensional array with 2, 3 and 4 dimensions can be used practically but what...
  16. Replies
    10
    Views
    2,367

    Re: First assignment java program

    Open a fully functional java program and use it as a checklist to see what the code needs to be functional. So far, you've identified there has to be a ; at the end, a class and a method (either a...
  17. Re: How to open new windows after pressing button next?

    Can you post the contents of the .rar because many people (myself included) will not open a .rar for security reasons. You can use only the 1 JFrame you have and place the contents of the other...
  18. Re: How to print information from an array

    It may not be causing a problem right now but have you tried using hasNext() instead of hasNextLine() as the latter may return true even if there is nothing in the next line.

    As for your actual...
  19. Replies
    6
    Views
    1,505

    Re: PROBLEMS WITH LOGIN FORM

    There are a few ways to achieve what you want but without seeing the entire code, it's impossible to know why your program is behaving the way it is. One way is to use 1 JFrame and use a Layout...
  20. Replies
    1
    Views
    1,099

    Re: find a password

    Try replacing the == with equals(searchKey), that should fix the problem. If you don't care whether letters are upper or lower case, you can instead use equalsIgnoreCase(searchKey).
  21. Re: Cannot find symbol - method getItemNumber()

    Your Supplier class does not have the method getItemNumber().
  22. Re: Newbie Question...GUI Text input Areas

    Easiest way that you can do in 1 chained line or a few lines is to first keep jtf.Message.getText() as that retrieves and represents the value as a String object. To get that into a primitive int,...
  23. Replies
    3
    Views
    1,427

    Re: Noob to Java

    There are many on YouTube, such as:

    Brandonio Productions - YouTube
    thenewboston - YouTube

    In terms of compilers, there are numerous different ones and any one should suffice your needs. The...
  24. Replies
    6
    Views
    1,240

    Re: Components not appearing (need help!)

    When I write GUI code, I follow a specific layout of how I arrange my code. There are different ways of placing the event-listener code in the GUI, so feel free to use a different way if you wish....
  25. Re: Writing code to save in a file... help please

    If you already submitted your assignment, it's too late to add this but for future reference, your main method contains "throws IOException" but no where in the method do you use either a...
Results 1 to 25 of 54
Page 1 of 3 1 2 3