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 Wanet Telecoms Ltd 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 DaWickedRebel

  1. DaWickedRebel

    Recommendations for easy-to-use IDE tools

    Idea IntelliJ is much friendlier than Eclipse out of the box and is not very expensive.
  2. DaWickedRebel

    OS in Java?

    Hmmmm...a bootstrap JVM. Very interesting and unexplored concept. It would be possible, although difficult, to write a JVM/OS launcher hybrid that could be launced from the BIOS and a corresponding Java OS. I just dunno what the point would be...w/ Java you're looking for platform...
  3. DaWickedRebel

    ArrayList cast different types of objects

    Like stefanwagner said, it's tough to offer advice here without knowing your code's intention. If you're simply using the ArrayList to hold any type of Gun, then why not extract all common behavior into an inteface, then use generics to type your ArrayList ie public interface Gun {...
  4. DaWickedRebel

    SSL Error

    Hi all Rather new to using SSL though not so much to Java itself. I am attempting to connect to an outside vendor's Web Service via SSL and am getting the error "javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake" Here are some snippets of my code: public...
  5. DaWickedRebel

    validating day and month using SimpleDateFormat

    This is quick, dirty and untested, but something along these lines: public class MyDateEntryFilter{ public void validateEntry(String dateEntry) throws FormatException{ //assuming the only accepted format is "MM/dd/YYYY" try{ validateMonth(dateEntry); //day .. year...
  6. DaWickedRebel

    Best practice question

    I may not be 100% correct in this (who ever is?) but I believe the best practice in a case like this is to: 1. Declare all variables at the top of the scope in which they are to be used. For instance, a class level variable would be declared as follows: public class Connector{ private...
  7. DaWickedRebel

    validating day and month using SimpleDateFormat

    Personally, I would stop execution when I got to the parsing exception. It almost seems as if you are trying to do the same job twice. The parse exception is telling you that you have entered an invalid date. Since the initial value you set for parseDate is null, you should not attempt to use...
  8. DaWickedRebel

    validating day and month using SimpleDateFormat

    I don't think it is throwing an error...it is parsing your date as the 15th month of the year 2005, which if you think about it is actuall March of 2006. All your subsequent calculations are being performed on the newly parsed date of March 30, 2006. I would not advise you try to correct...
  9. DaWickedRebel

    getGraphics and repaint

    You said you are calling repaint on the Frame. I would just call repaint on whatever component you are drawing on (JPanel?). Also, if you are not using Java Swing, make sure you utilize double buffering to avoid the 'flickering'. If you are unsure, double buffering is the practice of drawing...
  10. DaWickedRebel

    ComboBox multiple columns

    I would load the ComboBox with your own Objects, not String values. For example: public class Mode { int value; String name; //..getters and setters public Mode() { //things you need for initialization here } public String toString() { //return the String you'd like to...
  11. DaWickedRebel

    if/else shorthand

    I hate to nit-pick, but I believe (blurb) : a ? b; should be (blurb) ? a : b; The ? and : were out of place.
  12. DaWickedRebel

    Problem "could not reserve enough space for object heap"

    You didn't say how much total memory your machine has, but remember you have to share the available memory with the OS, DLL's, etc. so you will not be able to allocate all the machines memory to the JVM. This thread may be of help. Rich
  13. DaWickedRebel

    Center align the contents of a TextField

    If you're willing to use Swing rather than AWT, I offer you the following: JTextField fld = new JTextField(); fld.setHorizontalAlignment(JTextField.CENTER); Hope this helps! Rich
  14. DaWickedRebel

    Useful java links?

    Hi porkymin, welcome to the world of Java! It would be helpful to know what background you are coming from. Are you currently a programmer? If so, what technologies and theories do you currently know and practice? Also, why is it you want to learn Java? What are your goals for it? Rich
  15. DaWickedRebel

    Can I resize the rows in a Grid Layout?

    Tutorial for my previous post... http://java.sun.com/docs/books/tutorial/uiswing/components/scrollpane.html

Part and Inventory Search

Back
Top