Tip Bank

DevX - Software Development Resource

Limiting rows returned by SELECT

Question: In PL/SQL, the following syntax is allowed: SELECT * FROM table WHERE ROWNUM < 25 This would return the first 24 rows of a table. Is there anything equivalent

DevX - Software Development Resource

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

DevX - Software Development Resource

System information..

Question: I’d like to write a little program that determines the type of system one has. It would be able to report, among other things, processor type, system/bios type/ver #,

DevX - Software Development Resource

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

DevX - Software Development Resource

Mouse Event Handling

Question: How do I program the right mouse button to bring up a window or dialog box when I right-click on a particular button? Answer: All Java AWT components exhibit

DevX - Software Development Resource

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

DevX - Software Development Resource

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

DevX - Software Development Resource

Operator overloading

Question: Can you do operator overloading in Java? If so, how? Answer: Java does not as of yet support operator overloading, and there are no signs that it will ever

DevX - Software Development Resource

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