Search:

Type: Posts; User: mwr76

Page 1 of 3 1 2 3

Search: Search took 0.12 seconds.

  1. Thread: Need help please

    by mwr76
    Replies
    14
    Views
    1,913

    Re: Need help please

    What is currencyFormat.format. Are they custom class and method? If they are you will need to post the code. I think what you are looking for is the String.format
    method. Take a look at this link:...
  2. Replies
    4
    Views
    2,188

    Re: extended JPanel is empty

    You do not have a constructor for your FindPanel Class. You need an overide constructor
  3. Replies
    6
    Views
    1,696

    Re: Not sure where the error is coming from

    What is the error you are getting? could you please post it.
  4. Replies
    6
    Views
    2,293

    Re: Need help coding Dice rolling simulation

    Take a look at the Math.random method
  5. Replies
    4
    Views
    1,396

    Re: Using CharAt statement

    First you cannot covert a String to a char. The charAt() method takes a parameter that is the index of the character within the String and returns that
    character so if it is out of range that...
  6. Replies
    3
    Views
    1,168

    Re: Please help with array code

    What is the specific question you have?
  7. Re: Need a non void method to return the first three characters of a string

    You could pass them by reference instead.
  8. Re: Help determining which day a particular date falls on.

    The easiest way would be to first assign a number to each day of the week.(1-7) Then find how many days are in between the current day and the future
    date. Then mod by 7. That will give you the...
  9. Replies
    3
    Views
    1,488

    Re: help with tax program???

    You should wrap your code on code tags show its easier to read. Where is the rest of your code? Where exactly are you stuck? One other thing you may
    want to try to name your variables in a more...
  10. Replies
    3
    Views
    1,510

    Re: Math program problem.

    I tested your program and got it to work. You have to look at your op variable. You need to store a char there instead of a single character string. Look at the charAt(0) method. When you evaluate...
  11. Replies
    5
    Views
    3,284

    Re: Can't instantiate custom class

    I forgot here is the compiler error:


    InputGrades.java:26: error: constructor Student in class Student cannot be applied to given types;
    Student stu = new Student(sId, new CollegeCourse(cId,...
  12. Replies
    5
    Views
    3,284

    Re: Can't instantiate custom class

    I am obviously still wrong because of my compiler error, am I any closer. I am trying to understand this conceptually, where am I wrong and
    why?

    tester class:



    import java.util.*;
  13. Replies
    5
    Views
    3,284

    Can't instantiate custom class

    I have a class CollegeCourse:



    public class CollegeCourse
    {
    private String courseId;
    private int creditHours;
    private char grade;
  14. Replies
    11
    Views
    5,267

    Re: okay, i'm getting REALLY upset

    First, Your title for the post is not a good one. People have probably been inclined not to help because of the title. It should be a simple direct summary of
    the problem. Second, I would take...
  15. Replies
    2
    Views
    894

    Re: Problems with "/n"?

    The new line character is \n not /n That would be your problem. You could use the String.format method also.
  16. Replies
    1
    Views
    1,371

    Re: Need some help on my HS Project

    The method charAt(); returns a char. You are trying to store it in a String variable. So your String ch is not of a compatible type with your charAt() method. You can use those two symbols one you...
  17. Replies
    2
    Views
    1,506

    [SOLVED] Re: (beginner) Switch Statement

    One thing that jumps out is your case numbers. You have them as ints but your switch statement variable is a char. You numbers should be '2' or '3' etc...

    also you may have to take the input as a...
  18. Re: Help with interrupting a loop without break or continue

    I figured it out. I thought I would share the solution. I added commented asterics lines to show the beginning and end of the code blocks I added:



    import java.util.*;

    public class...
  19. Help with interrupting a loop without break or continue

    My instructor will not allow us to use break, (unless it is within a switch statement) or continue. I have written a program that takes a phrase with a hyphen and prints out the corresponding phone...
  20. Thread: Help with Swing

    by mwr76
    Replies
    1
    Views
    1,280

    Help with Swing

    I am trying to make a calculator. I am just trying to setup the GUI first. The problem I am having is that I want the JTextField to be the full width of the pane above all the JButtons. I want the...
  21. Thread: .jar executable

    by mwr76
    Replies
    2
    Views
    1,739

    .jar executable

    I created an app and created a .jar file with all the needed files. I can double click on it in the destination folder and it will run. I emailed it to a friend and when he tries to run it he gets a...
  22. Replies
    2
    Views
    1,912

    Re: java.lang.NullPointerException

    Thank you I feel so dumb.... I instantiated them first, then decided I wanted them private to that method. Dumb.... Thank you!!!!!!!!!!!!
  23. Replies
    4
    Views
    1,316

    Re: Help with methods

    I could give you the code but that wouldn't help you. Here is a link. Go here and find the String class. It lists all the methods there are in the String class the parameters each method takes. There...
  24. Replies
    2
    Views
    1,912

    java.lang.NullPointerException

    I tried to debug but I cannot find which object is null ( I am using JGrasp)

    here is the exception:



    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
    at...
  25. Replies
    1
    Views
    1,312

    Help with swing GUI

    I wrote this program and it works perfectly running in the console. I want to use swing dialog boxes. I replaced all my console outputs with
    JOptionPanes. But I realize I need to find a way to...
Results 1 to 25 of 55
Page 1 of 3 1 2 3