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 Chriss Miller 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 wangdong

  1. wangdong

    cant show my applet in WinXP

    First, you have to make sure the JRE is on your computer. Then, you can run the applet by using appletviewer. Chinese Java Faq Forum http://www.4ugo.com/bbs/index.htm
  2. wangdong

    Uploading Binary Data to Database (mySql or SQL Server)

    I did the same thing before, and it worked. What's the field type that you are using to store your PDF data? Chinese Java Faq Forum http://www.4ugo.com/bbs/index.htm
  3. wangdong

    Error - start of expression

    I cannot rebuild your code. but if you want to replace a word within a string, you can use replace(String a,String b). String a="I hate you."; a.replace("hate", "love"); Chinese Java Faq Forum http://www.4ugo.com/bbs/index.htm
  4. wangdong

    Remove duplicates and sort comma seperated string

    Yes, I think if you are trying to implement your class from the Object class, you have to override two methods compareTo() and HashCode(), this will avoid your problem. Chinese Java Faq Forum http://www.4ugo.com/bbs/index.htm
  5. wangdong

    Closing a URL Connection

    Here is how you can close an URL connection, please make sure that disconnect() is called within a try/finally block. URL url = new URL(this.url); connection = (HttpURLConnection) url.openConnection(proxy); connection.disconnect(); Chinese Java Faq Forum http://www.4ugo.com/bbs/index.htm
  6. wangdong

    how to format a date using java

    Here is a full example of data/time output. http://www.4ugo.com/bbs/dispbbs.asp?BoardID=18&ID=386&replyID=&skin=1 Chinese Java Faq Forum http://www.4ugo.com/bbs/index.htm
  7. wangdong

    can anyone help me

    First of all, get youself a spring frame work. Second, learn how to use hibernate. Finally, write your code. Chinese Java Faq Forum http://www.4ugo.com/bbs/index.htm
  8. wangdong

    Remove duplicates and sort comma seperated string

    Here is an example. import java.util.Arrays; import java.util.HashSet; import java.util.Set; public class StringSort { public static void main(String args[]){ String tmp="One,Five,Seven,One,Three,Four"; String []target=tmp.split(","); Set<String> set = new HashSet<String>()...
  9. wangdong

    Java - drawing images to a JPanel

    it would be the same. I have tried to add an extra JPanel. just copy the following code, and run it from NetBeans. import java.awt.BorderLayout; import java.awt.Graphics; import javax.swing.JFrame; import javax.swing.JPanel; import java.awt.GridBagLayout; public class ImageFrame extends...
  10. wangdong

    Java fonts when upgrading Swing from 1.3 to 1.4

    Are you sure that on Windows 2003 has the same font of your Windows XP? It might be a java problem, who knows! Chinese Java Faq Forum http://www.4ugo.com/bbs/index.htm
  11. wangdong

    Java - drawing images to a JPanel

    Hope this can help you a bit. import java.awt.BorderLayout; import java.awt.Graphics; import javax.swing.JFrame; import javax.swing.JPanel; public class ImageFrame extends JFrame { private static final long serialVersionUID = 1L; private JPanel jContentPane = null; /** * This is the...
  12. wangdong

    Popup menu

    That solution is ok for the copy action, but not for the past. I can asign a value to a variable outside the listener, but when I do paste, how the program knows which component I am on. Chinese Java Faq Forum http://www.4ugo.com/bbs/index.htm
  13. wangdong

    Popup menu

    How can I resolve this: jMenuItemCopy.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { Clipboard clipboard = getToolkit ().getSystemClipboard (); StringSelection selection...
  14. wangdong

    Popup menu

    I have two textPane on a JFrame and want to add a popup menu(copy/past) for each of them. How can I get around of creating two JPopupMenus? just use one for both? Thank you! Chinese Java Faq Forum http://www.4ugo.com/bbs/index.htm
  15. wangdong

    Move file and rename if it is not being accessed by other process

    I think if a file is being modified, Java will throw an error. If you want a more clever way to process file, you probably can find some help on Java Desktop. Chinese Java Faq Forum http://www.4ugo.com/bbs/index.htm

Part and Inventory Search

Back
Top