Search:

Type: Posts; User: ShaunB

Page 1 of 3 1 2 3

Search: Search took 0.69 seconds.

  1. Thread: Switch problem

    by ShaunB
    Replies
    5
    Views
    393

    Re: Switch problem

    Hi SilentNite17,

    I missed your reply and I guess that it's moot now, but those who're interested, a quick and dirty example of using a look-up table to generate a random key has been posted on my...
  2. Thread: Switch problem

    by ShaunB
    Replies
    5
    Views
    393

    Re: Switch problem

    For switch case, you need to use break and return, for instance:



    switch ((byte)c)
    {
    case 0:
    return 'a';
    break;
    /** more switch cases */
  3. Replies
    4
    Views
    379

    Re: How to display variables in HTML?

    That's why I want to see the example code... I personally think someone has mixed up Javascript with Java.

    Regards,

    Shaun.
  4. Replies
    4
    Views
    379

    Re: How to display variables in HTML?

    I'm not sure what you mean... do you have some example code please? I use HTML variables, but with PHP and Javascript, not done this with Java, but I'd be interested to know too, and therefore see...
  5. One to one computer programming lessons in the West Midlands (UK) area.

    One to one computer programming tuition available in the Birmingham (West Midlands) area at affordable hourly rates.

    Learn programming principles to improve your mathematics, logic and problem...
  6. Replies
    2
    Views
    763

    Re: Small project for my own experience...

    Try making a simple 2D game would be my advice: games programming isn't as easy as you may think games interact with humans, so you have to have many considerations and break down each logically. For...
  7. Replies
    4
    Views
    6,407

    Re: Applet paint program frame work.

    As I'm revisiting Java (from a much clearer perspective), and I've done a simple animation in an JApplet. For those who are interested, please read up about Applet life cycles, but this example uses...
  8. Re: Drawing a house using methods

    Okay, thanks. But I didn't think that my solution was that good to be honest. You could probably have done it better.

    Regards,

    Shaun.
  9. Re: Drawing a house using methods

    Hi,

    This example uses your program and adds buffering as well as separating the data of drawing the house. Look at the drawHouse method: this allows you to move the house on the X and Y axis. This...
  10. Re: how i want to change my answer to 2 decimal place....... help urgent

    C is okay with me, as is Java. People who worry about the syntax spend too long learning new languages.

    Regards,

    Shaun.
  11. Re: Implementing the GregorianDate class; Help, I'm clueless!

    I'm not sure if this will help, and I doubt it'll be a perfect solution, but I posted some code here:
    ...
  12. Re: how i want to change my answer to 2 decimal place....... help urgent

    I didn't know you could use printf - I generally use System.out.format("%.2f", 1.234);

    Regards,

    Shaun.
  13. Replies
    1
    Views
    1,047

    Re: Game Programming Question?

    I found the website edu4java Home very useful.

    Regards,

    Shaun.
  14. Replies
    5
    Views
    4,419

    Re: Building your own Date class.

    Just a note for anyone who might be studying under a UK-based higher-educational institution in Manchester that isn't the University of Manchester. If you're studying the 'Advanced Programming'...
  15. Replies
    5
    Views
    4,419

    Re: Building your own Date class.

    Hi,

    I've moved onto the rather scary world of Visual C++ since changing educational institutions, amongst other languages, but I've just realised very recently that some of this might be...
  16. Replies
    5
    Views
    4,419

    Re: Building your own Date class.

    I forgot to say, here's simple date-test class. Change the numbers in the FOR/NEXT loop with the yr variable in it to work out dates from other years. I think it's set to 1900, but I'm sure you are...
  17. Replies
    5
    Views
    4,419

    Building your own Date class.

    As this is the most interesting and useful piece of Java code I've written during my two-years of study, I thought I'd post the code. There are some anomolies in the class, for instance, because it...
  18. Replies
    6
    Views
    1,365

    Re: Pop-out box using a JFrame.

    Thanks again - we did something about anonymous inner-classes at some point during my studies, I'm just showing that I understand what's meant by that by implementing it in my project.

    Still so...
  19. Replies
    6
    Views
    1,365

    Re: Pop-out box using a JFrame.

    And the solution is...



    /* Put this at the beginning somewhere... */
    final HelpFrame popOut0=new HelpFrame();
    popOut0.setSize(600,400);
    popOut0.setResizable(false);...
  20. Replies
    6
    Views
    1,365

    Re: Pop-out box using a JFrame.

    Why didn't I think of that at 2am this morning? Good call. PM me your address and I'll send your crisp :-)

    As for using a dialog... I'll search for some examples. Thanks.

    Regards,

    Shaun.
  21. Replies
    6
    Views
    1,365

    Pop-out box using a JFrame.

    Hi all,

    I'm building a simple application to store and retrieve student records (sort of a limited database). What I have is a help box that appears from a drop-down menu, appearing as a JFrame....
  22. Re: Working out the day from numeric date (dd/mm/yy format).

    I success with working out the day from the date: The only anomoly in my code is that it thinks that 1900 is a leap-year and so returns the wrong days for January and February of that year (that's...
  23. Re: Working out the day from numeric date (dd/mm/yy format).

    I've found something that I understand here: How to calculate mentally the day of the week for any so, once I have a piece of code working, I'll post it if people are intersted to see it?

    Regards,...
  24. Replies
    4
    Views
    431

    Re: Question on arrays.

    Don't declare it *in* your loop, but at the beginning of your program. For instance, if you're using an array of type int, and your loop counts from zero to 11 (meaning 12 possible entries in the...
  25. Thread: Date problem

    by ShaunB
    Replies
    7
    Views
    418

    Re: Date problem

    A note about ArrayList types: some earlier Java IDEs don't like this. I know because the College has a lot of really old software installed on their PCs. I don't understand why educational...
Results 1 to 25 of 59
Page 1 of 3 1 2 3