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 wOOdy-Soft 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 seanmceligot

  1. seanmceligot

    how to find out javac version

    javac -J-version will report correct version even if the PATH and CLASSPATH are pointing the another jdk. Sean McEligot
  2. seanmceligot

    Set size of JList withOUT JScrollpane

    Max/Min/PreferredSize are ignored by many layouts. You need to choose a layout or set the layout to null and use x/y coordinates. Read this tutorial on Layouts from Sun. http://java.sun.com/docs/books/tutorial/uiswing/layout/index.html Sean McEligot
  3. seanmceligot

    jar file doesn´t work

    I don't know. That looks right to me. I would try removing the type "Executable Jar File" and starting over. Sean McEligot
  4. seanmceligot

    How to delete a module from the CVS Repository

    The safe way is to call check out the module and call cvs remove on all the files. If you have a backup or never want to see the module again, just delete the modules directory on the server side. For example, if your module name is myapp and your cvs repository (on linux) is in...
  5. seanmceligot

    jar file doesn´t work

    Make sure you can run it from the command line first. java -jar filename.jar It that works, you probably need to set up the correct assosiation for jar files. This depends on what version of windows you are using (assuming you are using windows). Sean McEligot
  6. seanmceligot

    HTTP head

    You need at least the following: 1. Wait for the web browser to send an empty line signaling it is done with its request. 2. Send HTTP/1.1 200 OK as first line of response. 3. You need an empty line between headers and html. import java.net.*; import java.io.*; public class MyHttpServer {...
  7. seanmceligot

    Inserting a carriage return and outputting to a file

    [code] FileWriter fout = new FileWriter("filename.txt"); PrintWriter out = new PrintWriter(fout); ... out.print(ch); if (ch == '~') { out.println(); } ... out.close(); [code] Sean McEligot
  8. seanmceligot

    Help with how to sort 2 arrays

    It's probably better to create a class like hologram said, but just for fun .... here it is. [code] public class BubbleSort { public static void swap(String[] array, int i, int j) { String temp = array[i]; array[i] = array[j]; array[j] = temp; } public static void swap(int[] array, int...
  9. seanmceligot

    Inserting a carriage return and outputting to a file

    public class Split { public static void main(String[] args) throws Exception { String line = &quot;blah~blah*blah~blah*blah*blah*blah~&quot;; for (int i = 0; i < line.length(); i++) { char ch = line.charAt(i); System.out.print(ch); if (ch == '~') {...
  10. seanmceligot

    How to save and restore listener info?

    Ion may be right. If you can, it is better to add your Listeners after deserializing. There are cases where you might want to serialize your Listeners. For example, if Listeners are added dynamically based on user commands. Here's how to create you serializable action listeners if you choose...
  11. seanmceligot

    Change System Properties

    Is there a .jar file, or other script file, where default variables can be set? No. I'm pretty sure there isn't. There may still be something you can do depending on what java application you are running and how you run it. If you are using the Java Plugin, for example, you can set java runtime...
  12. seanmceligot

    Object keeps containing the same data on output

    String temp = s.returnLine(); for(int i = 0; i < linesRead;i++) { temp = s.returnLine(); } Every time you assign temp to s.returnLine() you are overwriting the previous value before using it. You have a for loop in the main so you only want to get one line at a time in each set method. You...
  13. seanmceligot

    Array of objects

    for(k=0; k<n-1; k++) should be: for(k=0; k<n; k++) { Sean McEligot
  14. seanmceligot

    Formatting strings to display correctly

    You can use ostringstream for this. #include <sstream> #include <iostream> #include <vector> using namespace std; int main(void) { ostringstream stream; stream<<&quot;Number of points: &quot;<<20<<&quot;\t&quot;<<&quot;SD:&quot;<<8.733; string str(stream.str()); cout<<str<<endl...
  15. seanmceligot

    Are these variables well initialized?

    Do i need any 'new' to create properly objects c1 c2 c3? No. &quot;new&quot; is called somewhere in read(), or in a method called by read(). Function return values don't need &quot;new&quot; because they are already instantiated before they are returned to the caller. Is correct create the...

Part and Inventory Search

Back
Top