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 strongm 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. Reddy316

    return current date

    Hi, try this out.. java.sql.Date date = new java.sql.Date(java.util.Calendar.getInstance().getTime().getTime()); Then u can send the date to the date time field in the sql server. Hope this helps Reddy316
  2. Reddy316

    Mouse event listeners

    Hi, u can use checkbox.setToolTipText(&quot;<what you want>&quot;); that does what you wanted.
  3. Reddy316

    Newbie - Class / Array question

    Hi, First of all there is no such thing as a dumb question when we are learning. Ok coming to ur query here goes. U have declared a new class MyClass, that is right. U have made an array of 10 of these, that is also right. but u must understand that when u are making the array , u are...
  4. Reddy316

    ClassLoader

    Hi, IF u can send us the code snippet, it would be more helpful.. Cheers, Reddy316
  5. Reddy316

    i thought this would be a great place

    Hi, Here is the code that does the job for u.. import java.util.*; class Lister { public static void main(String[] args) { /** make a new linked list */ LinkedList list = new LinkedList(); /** add five strings to the linked list */ for (int i = 0; i < 5 ; i++) {...
  6. Reddy316

    character or digit

    Hi, U can use the following code String str = &quot;AA6&quot;; if(Character.isDigit(str.charAt(1)))//pick the 2nd char { System.out.println(&quot;digit&quot;); } else if(Character.isLetter(str.charAt(1))) { System.out.println(&quot;character&quot;); } Hope this helps...
  7. Reddy316

    automate a script

    Hi, U can run cron jobs and specify the name of the class file which actually does the mailing job.. cron would do just fine for ur requirement. Cheers, Reddy316
  8. Reddy316

    HI any thing Visual Grids (for spread sheet applications ) in java

    Hi, U can use JTable in javax.swing package.. It has the solution to ur needs. If u go through the JTable documentation u will easily set up ur spreadsheet application. Lookup the documentation for DefaultTableModel, TableColumnModel and TableColumn while u are at it. Using these four classes...
  9. Reddy316

    running batch files

    Hi Vepo, Hey thanx for the information man. That was really helpful. Cheers, Reddy316
  10. Reddy316

    running batch files

    Hi, As far as i know the parameter that u pass to the exec method of the Runtime class has to be an .exe for the run time to execute it ,it cannot execute .bat files. I dont know if there is a workaround to it. Cheers, Reddy316
  11. Reddy316

    JList Problem

    Hi, From what i get, u have a JList with some values in it and u want to send the selected item from the list to some method. If ur q is this, then the solution is casting. Ex. String selValue=(String)customerList.getSelectedValue(); method(selValue); Hope this helps, Reddy316
  12. Reddy316

    Null Pointer Exception

    Hi, If u see the working of the for loop, it works like this, the for loop executes while the condition u specify is true. but if u see in &quot;for(tmp = 0; tmp >= level - 1; tmp++)&quot; it will execute only once i.e for tmp = 0 because the next time it comes to the condition check, a...
  13. Reddy316

    add a time period of delay in main thread.

    Hi, Prosper is right about the infinite loop. I would like to tell u that u can have a thread's sleep method in ur main method as well.. u will have to do this. // get the currently executing thread. Thread mainThread = Thread.currentThread(); // make it sleep for how much ever...
  14. Reddy316

    Reading a text file for authentication help

    Hi, I went through ur code and found that if u put ur TotLen and LookLen and the substring operation within the if statements limits ur program will work fine. Heres what u need to modify. if (record.startsWith (LookFor)) { TotLen = record.length(); LookLen = LookFor.length()...
  15. Reddy316

    graphics : prompt box

    Hi, U can use the JOptionPane class in javax.swing. It contains a static method called showInputDialog() which prompts the user to enter a string. on clicking the ok button the string is returned to the calling class. The method signature is public static String showInputDialog(Component...
  16. Reddy316

    Word wrap in java

    Hi, If u are using a JTextArea to display the text then u can use the setLineWrap(boolean wrap) method to specify word wrapping otherwise u will have to use ur own methods to get the desired effect. I am pasting the method's explanation for you. setLineWrap(boolean wrap) Sets the...
  17. Reddy316

    Inserting Data Into MS Access Thru JDBC

    Hi, There is nothing wrong with that query, unless u are setting autocommit to false and then not commiting the transaction after the insert. just put a try catch around that statement and then check if there are any sql exceptions being thrown. U could also use the...
  18. Reddy316

    Pblm with JFrame and JPanel

    Hi, Add an actionListener on ur radio button and trap it in the action performed and then disable the menuitem and enable it again on unchecking ur radion button. The code will be something like this. // first add the menuitem on the menu object // and add the menu object to the menubar...
  19. Reddy316

    Viewport takes more size than view

    Hi All, I have this problem, i have an object &quot;ImageCanvas&quot; extending JComponent on which i can set a jpeg image..this is a class provided by java itself. Now i have set this component as the view for a JScrollPane. The problem is that even though i have set the size for the...
  20. Reddy316

    read a file properties

    Hi, This class should take care of ur problems..its a pretty long one though.. but takes care of saving the properties object and everything.. Hope this helps, Reddy316. import java.util.Enumeration; import java.util.Properties; import java.io.File; import java.io.FileOutputStream; import...

Part and Inventory Search

Back
Top