Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!

Glenn Wearen

+ Follow
since Feb 21, 2001
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Glenn Wearen

I think you might have two problems here.
The NoClass error, seems to point that either your JSP references a bean whose class is not in the web-inf/classes folder.
The response is already committed error occurs frequently if
you have <jsp:include page in your linked JSP, you cannt set headers, redirect or forward if you have used <jsp:include becuase the flush attribute must be set to "true"
if you can replace <jsp:include with <%@ include instead it will fix that problem
19 years ago
I have two attempts at the same project
1. Attempts to use Swing components only
2. Attempts to use AWT components only
I have not mixed components so far (so good!)
I've recently read on this board that using swing JApplet (and related J-components add alot of overhead, is this true? while I like the option to add Swing enhancements later if needs be, I don't really need them right now.
19 years ago
How do I stop objects from over-lying each other, I see that my Swing opjects have an opaque property, is this how?
For example, say I have a Applet 600x400, and I have a JScrollPane (bounds are 600x150) on it, and in that JScrollPane , I have a JTable which is set to 600x150 too and a white background. When I run the application I expect to see a white background, but all I get is the same lightgrey that the Applet and JScrollpane have, what's going on?
Related problem...
In general, the API doesn't explain visually what certain objects
look like or how they behave (visually). Since we are after all creating visual componets there must be a visual explanation somewhere (besides the Java Tutorial), in a form like the API
19 years ago
I've started a new project, and decided to use Swings JApplet instead of Applet because I like all the nice things you can do.
However, I find Swing a bit more complex than I expected, since most graphical components are usually modified indirectly by modifying some sort of Model, I have variables declared all over the place, and I really don't know where the right place to declare the components is.
So here's the question: the Java tutorial shows examples where applet variables are declared in the class itself and in the init() method e.g.
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
public class MultiListener extends JApplet
implements ActionListener {

//Glenn's comment: class variables...
JTextArea topTextArea;
JTextArea bottomTextArea;
JButton button1, button2;
final static String newline = "\n";
public void init() {
//Glenn's Comment: more variables??
JLabel l = null;
GridBagLayout gridbag = new GridBagLayout();
GridBagConstraints c = new GridBagConstraints();
JPanel contentPane = new JPanel();
//Glenn's comment:
//another variable the same name as the class variable?
button1 = new JButton("Blah blah blah");
Here's a similar problem, I have a table (visual interface object) and I want to populate it with data from my database (business object), I want to keep the buisness stuff away from the interface stuff, so where do I create my buisness object, if so, how do I pass it to the interface object?
Hope somebody can help
19 years ago