October 2, 1998

Selecting a maximum sum from a group

Question: I need to write a query that selects the maximus sum for a group from a list like the one below. Type ValueA 100B 200C 300A 300B 100C 342

Event handling with multiple scrollbars

Question: I’m trying to work on the basics of event handling. I found it easy to set one label and have the scrollbar change the value of the label. I

Adding a Component to a JTable

Question: How do I add a JButton to the cells of a JTable? Answer: Using the Swing JTable class can become a sticky business when you want to customize it

Graphics.create()

Question: For what uses can the Graphics.create() method be used? Answer: There will be cases where you want to make a copy of a Graphics context and make some alterations

Canvas in a ScrollPane

Question: How can you make a canvas nonresizable? The canvas automatically resizes when the frame is resized. Answer: The default layout manager for java.awt.Frame is BorderLayout. BorderLayout will expand the

SQL Query

Question: I am a beginner in SQL and can’t figure out how to do this: I have two tables with three fields in the row of table1 referencing a master

Java Threads and Multiple Processors

Question: On a Windows NT box with multiple processors, will a multithreaded Java application get split between the processors automatically? Answer: This depends on the version and vendor of theJVM

Textfield focus

Question: I have a frame with a few textfields on it. How can I set the focus to the first textfield? Is there something like setFocus? Answer: A component can