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?...
Type: Posts; User: huddo
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?...
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
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...
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
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...
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
...
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...
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...
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
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....
thanks for that. i shall have a play around with the transfer handler
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
sorry for the late reply
import javax.swing.*;
import java.util.ArrayList;
import java.awt.*;
import java.awt.event.*;
import java.util.*;
what exactly do you want in the test program? would you like me to upload the whole package?
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...
@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...
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...