I'm not sure about drjava, but it should pretty much be the same as I did in JCreator. Make an applet project and have two files: one for the main coding (BreakOut.java) and one for the brick properties (brick.java).

Hey, I was making my own breakout game but encoutered problems in the brick collision detection, I made a working version but the brick collision detection was really sloppy and badly written (got all bricks coordinates and constantly checked if the ball was somewhere in there).
Well after looking at your source code i had some questions.
on this line:
block[i].visible && by <= block[i].y + block[i].height && bx + bwidth >= block[i].x && bx <= block[i].x + block[i].width && by + bheight >= block[i].y) {

when you write block[i].y, what does the dot mean?

Also when I draw my bricks I use a different technique, will this impair my chances of collision detection working? here is my code for the drawing of the bricks: