Search:

Type: Posts; User: huddo

Search: Search took 0.38 seconds.

  1. Replies
    1
    Views
    475

    pause while playing sound

    i'm making a battleships game for a school assignment and i'm playing a sound when a boat is either hit or sunk. The sound plays fine but how do i make the program pause while the sound is playing?...
  2. Replies
    7
    Views
    385

    Re: Serialisation not working

    its all good. I've found a way to save it using a database. i know its probably not as good but i already has a database in my application and have used sql before
  3. Replies
    7
    Views
    385

    Re: Serialisation not working

    yeah I've tried that. but i can get all of them to work by themselves. i can get it to work by setting some of them transient and working out which ones actually work but it may work the first time...
  4. Replies
    7
    Views
    385

    Re: Serialisation not working

    yeah i have implemented the serialisable interface on every class that I. I know that it fails because it tells me that the JMenuBar is not serialisable and stops the code
  5. Thread: class function

    by huddo
    Replies
    9
    Views
    596

    Re: class function

    that code works out the number of squares the player can have. I could use a JOptionPane but I'm trying to make it so that it is easy for the user to use and they can't screw up by putting in a...
  6. Replies
    7
    Views
    385

    Serialisation not working

    What objects include the com.apple.laf.AquaMenuBarBorder object? i know that JMenuBars do so i can't serialise those.
    I am trying to serialise a class that holds the following variables

    ...
  7. Thread: class function

    by huddo
    Replies
    9
    Views
    596

    Re: class function

    basically this is what my program does

    -gets the number of players and the game type they want to play with -multiplayer, beat the clock and a high score mode
    -depending on the number of players...
  8. Thread: class function

    by huddo
    Replies
    9
    Views
    596

    Re: class function

    sorry i hadn't finished writing the whole function before i put it up. But basically i'm making a memory game for school, so choose two cards and see if they match. i've made it so that the board...
  9. Thread: class function

    by huddo
    Replies
    9
    Views
    596

    Re: class function

    thanks for your help. i've ended up doing this inside the Tuple class



    static public Tuple compare(Tuple[] t) {
    return new Tuple(1,1);
    }
    which can be called like so
  10. Thread: class function

    by huddo
    Replies
    9
    Views
    596

    class function

    hi

    i have created a class called Tuple that simply has two variables in it that are defined when the class is created. what i want to do now is add a function to the class that is called compare....
  11. Replies
    15
    Views
    2,241

    Re: MouseReleased event not being called

    thanks for that. i shall have a play around with the transfer handler
  12. Replies
    15
    Views
    2,241

    Re: MouseReleased event not being called

    import javax.swing.*;
    import java.util.ArrayList;
    import java.awt.*;
    import java.awt.event.*;
    import java.util.*;
    import java.io.*;


    /*
    * To change this template, choose Tools | Templates
  13. Replies
    15
    Views
    2,241

    Re: MouseReleased event not being called

    sorry for the late reply




    import javax.swing.*;
    import java.util.ArrayList;
    import java.awt.*;
    import java.awt.event.*;
    import java.util.*;
  14. Replies
    15
    Views
    2,241

    Re: MouseReleased event not being called

    what exactly do you want in the test program? would you like me to upload the whole package?
  15. Replies
    15
    Views
    2,241

    Re: MouseReleased event not being called

    after testing another program i think the new button isn't gaining focus and so the mouseReleased isn't being called. Is there a simple way of allowing the new button to gain the focus? maybe using...
  16. Replies
    15
    Views
    2,241

    Re: MouseReleased event not being called

    @aussiemcgr the button is an extension of JButton where i have added a couple of extra properties that i can use in other parts of the game. I am dragging the image from one button and then dropping...
  17. Replies
    15
    Views
    2,241

    MouseReleased event not being called

    Hi,

    i am trying to make a chess game and in order to do that I'm using a drag and drop method to move the characters.

    I have been able to implement a mouse adapter to drag and drop the...
Results 1 to 17 of 17