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. OttSens

    statfs() problem?

    Just a guess but looking at the man for statfs I believe the size is in blocks not bytes while df is bytes. I think the solution is myStatfs.f_bsize * myStatfs.f_bfree. ? struct statfs { u_int32_t f_flags; /* copy of mount flags */ int32_t f_bsize; /*...
  2. OttSens

    Catching output from a command

    Hi All I'm triing to catch the output from a g++ command from my ui. I'm using popen to get a file pointer from which I read output. The catch is that this works fine with regular shell commands like "ps -ax\n" but with g++ the output goes to stderr. As near as I can tell there is no...
  3. OttSens

    JDialog

    Call dispose(); You also need to do setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); in case the user closes the dialog with the X button. Usually in a constructor or int method.
  4. OttSens

    API Error

    It's not an error. It is a warning. It compiled successfully but gave a warning that some of the methods you are using are deprecated. That means they a marked to be dropped from future versions of java. Do what it says it you want details recompile whith the deprecation flag. javac -deprecation...
  5. OttSens

    GUI Set Up - Beginner Java Question - FlowLayout?

    I have found it easiest to use a base panel to which I add everything else and then do a getContentPane().add(basePanel);
  6. OttSens

    Calling programs

    Actually you can enable the hyper links by providing a listener. The editor pane has to be set to pane.setEditable(false) in order for it to generate events. Then make your app implement the HyperLinkListener interface and provide a hyperLinkUpdate method. public void...
  7. OttSens

    Background image in a pane

    Yes but you have to take care of drawing it. You need to subclass JPanel and override the paint method. Also if it's a tile you need to take care of drawing it multiple times to cover the whole panel. If this is the case this should be done using double buffering. (ie Drawing in memory and then...
  8. OttSens

    Opening a html file in browser from applet

    You can use live connect to access some javascript on the page to open a window and then write html to it. http://developer.netscape.com/docs/manuals/communicator/jsguide4/livecon.htm import netscape.javascript.*; public class myApplet extends Applet { public void init() { JSObject win...
  9. OttSens

    Calling programs

    You can use a JEditorPane or a JTextPane to display html pages. (like a browser) If there is any embedded script or anything like that you need to use the browser but for simple formatted html reports they're fine. This way it displays as part of your app.
  10. OttSens

    Java executable not found

    This is the browser not finding java. Are you using a java enabled browser?
  11. OttSens

    linked list multiple input

    Should in fact be a database for permanent storage. Inside your java app it should be an object public class Employee { private String name, id, position; private double salary; public Employee(String name, String id, String position, double salary) { this.name=name; this.id=id...
  12. OttSens

    Setting Environmental Variable - Driving me CRAZY!!!

    Easiest way I can think of is to start the app with a batch file set JAVA_HOME=C:\j2sdk1.4.0 c:\myApp.exe This will work. If you want to see just open a dos shell and type set JAVA_HOME=C:\j2sdk1.4.0 then echo %JAVA_HOME% However this value will be gone as soon as you close the dos window.
  13. OttSens

    Setting the org.xml.sax.driver

    Also I just read this at javasoft SAXParserFactory factory = SAXParserFactory.newInstance(); factory.setValidating(validating); parser = factory.newSAXParser();
  14. OttSens

    What makes a good editor?

    Visual Age is in fact a good ide. Howerver they are rather far behind in there support of new language features. It does have code completion and all the other stuff you mentioned and most important it has version control built in so you don't need to implement a cvs repository or alike...
  15. OttSens

    Setting the org.xml.sax.driver

    You can do it explicitly in your code so long as you make sure to lug around the appropriate driver. XMLReader xr = new org.apache.xerces.SAXDriver(); Then register all the usual handler stuff etc.........
  16. OttSens

    reading a vector to an inputstream

    A vector is serializable so you can read and write it as an object using object input and output streams. Howerver since vectors store plain vanilla objects you must either maintain some index of the types so you will be able to cast the contents correctly or use some type of intraspection on...
  17. OttSens

    Frame repain on startup.

    Without seeing the code it's hard to say but one likely scenario is that the images aren't loading on time. If you are not using a MediaTracker to load images then do so. Use the MediaTracker.waitForAll method to ensure that the images are loaded before proceeding.
  18. OttSens

    hello , i m developing A GUI .

    Either is great. The choice between these 2 languages should have more to do with what the app is going to do. Java is probubly the easiest since you hava a much better chance that machines will have java than tcl.(At least on ms windows machines which lets face it are unfortunately most...
  19. OttSens

    How to Send Info from Applet to CGI Script ??

    You redirect to the url. applet.showDocument(URL); If you want the user to stay on the same page then you have to do it independent of the browser. The applet can open a connection back to the machine where it came from ONLY so the cgi script must live on the same machine that the applet does...
  20. OttSens

    Recommended Books?

    Core Java2 Thinking in Java and an annoying piece of advice. Don't ignore c++ (and other more prickly topics) for java because java is easier. The market is about to be flooded with new java grads. Brace yourself buckaroos. </advice>

Part and Inventory Search

Back
Top