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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  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...
  16. AdamRice32

    Which is best IDE for development

    Hi All, I know this may be a bit off topic, but if you're a Java developer that strictly uses a text editor for coding (like me), and are interested in a little utility that will speed up the creation of setter/getter methods, take a look at a small tool that I've created that may help you out...
  17. AdamRice32

    Swing GridBagConstraints

    Hi someguy, The reason I used a JTextArea instead of a JLabel was simply because it allows you to put linebreaks in quite easily (by using the '\n' character in the String you pass in). I imagine that you can do something similar with a JLabel, but it wasn't apparent to me how to do so...
  18. AdamRice32

    File Chooser

    Hello rza22gza, What you are interested in is the input type of file (this is a standard HTML form object). For example: <input type=&quot;file&quot; name=&quot;fileInput&quot; size=&quot;50&quot;> This will cause two things to appear on your page: 1. A text input field (where...
  19. AdamRice32

    Getting started with JSP

    Hi MadHatts, Well, it depends what type of application you're creating. If you're going to need to set up a database, then you'll have to ensure that they can support the database on their server(s). But so long as the ISP can support JSPs (i.e. they have Tomcat or an equivalent...
  20. AdamRice32

    Extracting &quot;data&quot; from HTML -page....

    Hello Tlogist, That's exactly what you'd need to do. It shouldn't be too difficult a task, either. You can get a stream to any URL, and retrieve the contents of the HTML page into a String. Then you can parse through the String any way you'd like and pull out the appropriate value. The only...

Part and Inventory Search

Back
Top