I was trying to figure out how to insert pictures into Java, but as music in the background plays, the pictures alternate. It would be really great if someone could include the music code too. Thanks for any help in advance.
Luckly I already have(ish). I found this lying around with some other things I was messing with. Obviously this is not code that you ought to use (it is needlessly redundant in many aspects). It seems you do not know where to starty (you posted no code) anyway hope this helps you get started, good luck! Alos it does not include sound but I believe sound would be quite easy to add. http://stackoverflow.com/a/10237397
public class applet extends Applet
public void paint (Graphics g)
img = getImage(getCodeBase(), "a.jpg ");
img = getImage(getCodeBase(), "b.jpg ");
g.drawImage(img, 50, 50, 700, 500, this);
public int second()
Calendar now = Calendar.getInstance();
int mili = now.get(Calendar.SECOND);
wrong design, wrong notifiers, most important is repaint(); inside paint/PaintComponent (repaint from itself) caused endless loop with high CPU and GPU usage, missing there stop repainting for contianer or super.paint() as 1st code line in paint, otherwise nothing will be repainted correctly, only nice flickering
Need some help with this Array. I am trying to get the sum of the even numbers and the sum of the odd numbers using a for each loop. I know the answers to what I am trying to achive are sum of even = 84 and the sum of ...
I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on).
the function that I created to find the ...