Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by AdamRice32

  1. AdamRice32

    Application & Applet in same program

    I don't know of an example offhand, but this code snippet should help... public class MyApplet extends JApplet { public void init() { ... } public static void main( String[] args ) { // construct and initialize applet final MyApplet applet = new...
  2. AdamRice32

    Creating a JFrame with an animated background and Swing comps on top

    Hi All, This is a tricky one, or so it seems to me after a while of battling with Graphics2D, Graphics, double buffered images, and the like. Basically, I've got a double-buffered image as a background for a JFrame, and I want to paint some swing components onto the JFrame as well, on top of...
  3. AdamRice32

    Livelink Search API

    Did you ever find an answer for this? I'm having a very similar problem. Thanks in advance, Adam
  4. AdamRice32

    Calendar Month Represented Visually

    Cool... thanks much. This should definitely do the trick.
  5. AdamRice32

    Calendar Month Represented Visually

    Here's an interesting problem to which I haven't been able to come up with an intelligent solution: I need to display months of a Calendar in a JSP or the like. What is a good way to get a list of which days are valid for a particular month? And how can I determine which day of the week...
  6. AdamRice32

    Check if text field is empty

    Typically, when you are validating user input in Java, you will want to check for both null and empty string values. To check String objects for equality, you must use the .equals() method (not the == operator). Thus, a check for an empty String value might look something like this: if (...
  7. AdamRice32

    authenticating against NT domain controller using Java

    Hi All, Anyone have experience using JAAS to authenticate against an NT Domain controller? I've checked out the API docs and such, but haven't been able to piece together a simple solution... something like how linar's jintegra works is what I'm looking to do. That is, pass a domain...
  8. AdamRice32

    Books on GUI design

    Hi Ankur, The secret here is to use the correct layout managers in your application. You need to set things up so that if and when the window is stretched or shrunk, your components will all resize and will not be eliminated by the shrinking window. You may also need to determine the...
  9. AdamRice32

    EJB compiling

    Hi kishorecvr, There are a few ways to package EJBs, depending on the app server that you are deploying them on. For example, if you are deploying on JBoss, you can simply use the jar tool that comes with the SDK to compile your EJB jars. However, if you are using WebLogic, you need to run...
  10. AdamRice32

    pass null to int field of method

    Oh yeah, and that last line of code should read: ResultSet rs = ps.executeQuery(); Sorry 'bout that.
  11. AdamRice32

    pass null to int field of method

    Sorry... I guess I forgot to address the risks/issues associated with prepared statements. Essentially, they are useful because the SQL is compiled only once and is then cached on the database server. Thus, if you are repeatedly using the same queries, they should provide a performance...
  12. AdamRice32

    pass null to int field of method

    Try something like this: String myQuery = "SELECT * FROM someTable WHERE someColumn = ?"; c = DriverManager.getConnection( dbURL, dbUsername, dbPass ); PreparedStatement ps = c.prepareStatement( myQuery ); if ( myInt == -99 ) { ps.setNull( 1, java.sql.Types.INTEGER ); } else {...
  13. AdamRice32

    How do I set an inputmask on a JTextfield?

    Hi Themuppeteer, I think what you're going to want to use here is a custom document that will get attached to your text field. I've done this before for a date input field, and although it's kind of tricky, it's definitely do-able. Create an IPDocument that extends PlainDocument. You'll want...
  14. AdamRice32

    changing Jbutton Icon

    Hi bos, Check out the setIcon() method of JButton's superclass, javax.swing.AbstractButton. This should do the trick. Best, Adam Rice
  15. AdamRice32

    How to set up Config File for Logging in JDK 1.4

    Hi All, Does anyone have experience setting up a configuration file for a logging mechanism implemented using JDK1.4? Sadly, the API documentation says little to nothing about how to set up the config file. What I'm basically trying to do is to set up a default logging level (say WARNING) for...

Part and Inventory Search

Back
Top