Have a look at the "try it now" approach at w3schools. For example
http://www.w3schools.com/html/tryit....ml_form_submit. I think a similar setup for a tutorial on the various Swing controls and layouts would be effective... allowing the student to get "immediate feedback" on SMALL changes to a working example.
IMHO, Quizs are ineffective outside the classroom simply because most people don't do them. I've done quit a few CBT courses in my time, and the poorest ones mixed the "quiz questions" in with the instruction. I found the mix rather confusing, as has to think about "how to navigate the course" as apposed to thinking about the course material.
I think the best ever learning aid is a "solved problem", especially for computer programming. In this mode you present a problem, then present one (or more) solutions to that problem, and then discusses that (those) solution(s), pointing out the new an interesting concepts which have been introduced. If your presenting several possible solutions you typically do the "stepwise" refinement.. explaining why one solution is better than the others. This works especially well for fundamental programming constructs like selection and iteration.
I personally prefer exercises and challenges over quiz's. For example :
In chapter 2 we covered selection with the "if" statement and iteration with the "do while" and the "for" loop. Here's the completed code from the last example which prints "Hello World" five times, Yeah, pretty boring wasn't it... well, can you figure out how to make it print:
Hello World
Goodbye World
Hello World
Goodbye World
Hello World
by putting an if statement in the for loop? (Hint: if (i%2==0) then "i" is an even number)
If you get stuck hit the "Hint" button to see the solution to a similar problem. If you get completely lost hit the "I Whimp Out!" button to see the completed code.
I'd present all this on a form with a "Try It" button which compiles and runs the code. Eliminating compiler errors could be a problem. I've been thinking about the Visual Programming approach for a while. I stumbled over Alice (
http://www.alice.org/) last week, and I think it's a really excellent idea.
This is all just my opinion. I'm not a teacher, nor do I have any training in teaching. But I'm not a bad programmer, and I still remember my "formative years" in the trade... I think I would have enjoyed learning in such an environment.
Good luck with it.