Search:

Type: Posts; User: IanSawyer

Search: Search took 0.25 seconds.

  1. [SOLVED] Cryptarithmetic Recursive Algorithm Help

    Delete please.
  2. Replies
    0
    Views
    856

    Change colour of JComboBox arrow button

    Hi there,

    I would like to know how to change the background and foreground colour of the arrow button of a combo box.

    I have searched online and cannot find solution.
  3. [SOLVED] Re: CardLayout show a specific card with button click

    Thanks for your help!

    It works as intended now!
  4. [SOLVED] CardLayout show a specific card with button click

    I'm having trouble with the CardLayout to have a particular card to be displayed when a button is clicked.

    My code is posted below and I am sure that the issue is with the ".show" part but I am...
  5. [SOLVED] Re: Return all values in an ArrayList from a method

    Can this thread be deleted?

    I've come up with a solution.
  6. [SOLVED] Return all values in an ArrayList from a method

    Hi guys,

    Would anyone know how to get all values from an ArrayList using a method? I have the following code set up;



    public Object getList() {
    for (int j=0; j <...
  7. Replies
    4
    Views
    1,285

    [SOLVED] Re: Returning ArrayList via user input

    I see.

    Is it possible to create a 2D array of ArrayLists? So the array item array[0][1] would return list01?
  8. Replies
    4
    Views
    1,285

    [SOLVED] Returning ArrayList via user input

    Lets say I have multiple ArrayLists



    ArrayList<String> list01 = new ArrayList<String>();
    ArrayList<String> list02 = new ArrayList<String>();
    ArrayList<String> list03 = new...
  9. Need help to implement a solution with ArrayLists & Objects

    Here's the premise of what I'm trying to do.

    I need to write some code that will allow a user to add stops to a route between two places.

    For example, a person is travelling from Place A to...
  10. Replies
    20
    Views
    762

    [SOLVED] Re: Can't reassign boolean value!

    Thanks for the advice guys.

    I've amended my code so that values that will be used by multiple methods are class variables and any other variable is local to a particular method.
  11. Replies
    20
    Views
    762

    [SOLVED] Re: Can't reassign boolean value!

    I've fixed it!

    A couple of lines of code needed rearranging between methods!

    Thanks for your help, I'm sure that I wasn't entirely clear with my problems!
  12. Replies
    20
    Views
    762

    [SOLVED] Re: Can't reassign boolean value!

    The data that the program uses is input by the user through a command prompt window. The correct values of year, month and day are being printed.

    I have also now narrowed down the issue being...
  13. Replies
    20
    Views
    762

    [SOLVED] Re: Can't reassign boolean value!

    Even with hardcoded values, 0 is returned for lastDayOfMonth.

    I rewrote part of the code just for testing and put it into a single class and it all works fine. lastDayOfMonth returns the correct...
  14. Replies
    20
    Views
    762

    [SOLVED] Re: Can't reassign boolean value!

    Main class


    import java.util.*;
    import java.text.*;
    import javax.swing.*;

    public class MainClass {
    public static void main(String[]args){
  15. Replies
    20
    Views
    762

    [SOLVED] Re: Can't reassign boolean value!

    I have narrowed down the problem to the lastDayOfMonth = date.getActualMaximum(GregorianCalendar.DAY_OF_MONTH); line.

    For some reason that line returns 0 for any form of date when ran in the...
  16. Replies
    20
    Views
    762

    [SOLVED] Re: Can't reassign boolean value!

    Sorry I don't understand where I am supposed to add the println statements.

    And how would the discount=true; executed?
  17. Replies
    20
    Views
    762

    [SOLVED] Re: Can't reassign boolean value!

    The boolean isn't being set as true which is the issue.

    Any dates that I input which should meet the criteria of the if statement don't set the boolean to true. It stays false.
  18. Replies
    20
    Views
    762

    [SOLVED] Can't reassign boolean value!

    Hi guys,

    I am having an issue with some Java that I have written.

    I have a class called Journey and within this class I have some methods. In my code I have a boolean data member set as false...
Results 1 to 18 of 18