devxlogo

Tip Bank

What Reflection Means in Java

Through reflection, Java code can obtain information about, and performoperations on, data fields, methods, and constructors of loaded classes. Of coure, there are security restrictions. The reflection API (encapsulated in

Hide Implementation Details of Stored Procedures

You can hide the implementation details of your stored procedures from end users of the application using WITH ENCRYPTION option. ENCRYPTION indicates that SQL Server encrypts the syscomments table entry

Create a Label With Underlined Text

The following class will give you a label with underlined text. public class UnderlinedLabel extends java.awt.Label { public UnderlinedLabel() { this(“”); } public UnderlinedLabel(String text) { super(text); } public void

Create an Array of Functions in Java

Java doesn’t offer direct support for pointer to functions. But this doesnot mean that you cannot have a set of functions that can be accessed via amapping index. The code

Be User-Friendly With Double-Clicks

The idea behind the Java’s handling of double-clicks on the mouse is that if the mouse is clicked fast enough for two times in the same spot, a “java.awt.event.MouseEvent” event