About Experts Sitemap - Group 31 - Page 79 2016-02-02

Java: Choosing the best path towards game programming, opengl apis, 3d libraries
opengl apis, 3d libraries, jogl: Cedric, Okay, a 3D sudoku game should be pretty cool, although possibly very difficult for the person playing it! There are two possibilities for 3D libraries for you to use: JOGL and Java3D. JOGL is fairly low-level, and is basically a Java wrapper...

Java: Choosing Java to program a game, java programming experience, object oriented language
java programming experience, object oriented language, c programmer: Hi, This program can be done by any object oriented language that supports a gui, not necessarily java. To choose java just for having a ui is not the right thing to do! Since you are a c++ programmer, you could also think of having a mfc application...

Java: After Class.forName(Test), do we have to call Class.netInstance(),, feature documentation, theclass
feature documentation, theclass, java sun: Izzzz, The statement Class theClass; theClass = Class.forName( Test ); retrieves the Class object corresponding to the class named Test . The Class object is an instance of the class java.lang.Class , and it offers access to information...

Java: get a Class path, class path, test class
class path, test class, servlet class: oh thats easy: In your example: java.net.URL url = Test.class.getResource( Test.class ); would get the url of the class, this class might be loaded over the web or in an archive so you cannot necessrly assume that it is a local file. if you are absolutly...

Java: Classes, rectangular boxes, java installation
rectangular boxes, java installation, javac: There is no way to find a charset, instead you can guess the format given some of the characters. If a file starts with (hext) FEFF or FFFE then it is probably unicode. However unicode files do not have to start with this. If you ve ever tried to open a...

Java: Classes, javahome, string patterns
javahome, string patterns, title string: Every swing component has a ui class that is responsible for rendering it, and deciding how the user interacts with it. If you wanted to you could add a mouse listener and show a context menu on right-click, which gives the user the option to close the...

Java: Classes, javahome, string patterns
javahome, string patterns, tab bar: The netbeans source is there. When you choose to download, just scroll down to Other distributions, sources and extras Im not sure about netscape, but netbeans has a close button on each tab, as opposed to firefox (1.0) which has one close button for the...

Java: Classes, trap mouse, string patterns
trap mouse, string patterns, tab bar: Doing this is not easy, but I spent the time and wrote up a simple example of how to have close buttons: import javax.swing.*; import javax.swing.plaf.basic.*; import java.awt.*; import java.awt.event.*; public class Test { public static void...

Java: Classes, trap mouse, container parent
trap mouse, container parent, tab bar: Insets are the buffer around a component. If you increase the buffer it allows for more white space in the component. E.g. If you have a button with insets 0 it would look like: -------- |button| -------- If the insets are larger (as usual) it could look...

Java: Classes, trap mouse, container parent
trap mouse, container parent, tab bar: 1. The method implementation of addComponent in JTabbedPane goes like this: public void add(Component c) { if(!(c instance of UIResource)) { //add a tab for the component } else super.add(c); } 2. UI methods are called on...

Java: Classes, trap mouse, tab area
trap mouse, tab area, class that implements: As I said, whatever you add must implement UIResource. This means you need to extend JButton and implement UIResource. Also there are the following problems to be addressed: 1. The button will not have any size or location so it will not be visible. (Use...

Java: Classes, tab area, class that implements
tab area, class that implements, container parent: Well in my example I record the index of the tab in the CloseButtonAction class. You can ask the JTabbedPane which component corrspondes to which index. Note that buttons are not unique to the tab. The 3rd close button always refers to the 3rd tab. If the...

Java: Classes, corresponding elements, tab area
corresponding elements, tab area, class that implements: You can add a ContainerListener to recieve events when a component is added or removed, this however includes all components including the close buttons. If you want to (possibly) prevent the closing of a tab, you can extend JTabbedPane and override the...

Java: Classes, corresponding elements, tab area
corresponding elements, tab area, class that implements: This is (again) the responsibility of the UI. You could probably override the calculateTabHeight to allow for more height, and paintText to add into the title before calling super.paintText. You can also delegate the paint call to a Text component that...

Java: Classes, corresponding elements, jtextarea
corresponding elements, jtextarea, mouse motion: If you override the method and return true, Then word wrap is off. However when you return false, word wrap is on, but the text component will only be as large as it needs to be. So you must return true when the text component does not need to scroll, and...

Java: Classes, corresponding elements, jtextarea
corresponding elements, jtextarea, mouse motion: I just haven t had enough time to determine what the appropiate solution is. Fundimentally what you want to do is return true when you need to scroll and false otherwise. The implementation of the JTextArea is to return true when the perferred width exceedes...

Java: Classes, jtextarea, swing components
jtextarea, swing components, caret: You will notice that the only place that wrap is used is in: public boolean getScrollableTracksViewportWidth() { return (wrap) ? true : super.getScrollableTracksViewportWidth(); } so clearly if wrap is false you have to determine the correct...

Java: Classes, rectangular boxes, javahome
rectangular boxes, javahome, string patterns: You are either going to have to use a library that already does that. Or you have to override the JTabbedPaneUI. Look at javax.swing.plaf.basic.BasicTabbedPaneUI, of corse doing this you limit yourself to java look and feel for the toolbar. You can also...

Java: Classes, inheritence, default method
inheritence, default method, subclass: Hi Flora, As the saying goes, my father is rich and so am I, applies to java too! In order to inherit data/methods from the super, the subclass may do so, by either extending from another class or implementing an interface. when you inherit from a class,...

Java: Getting the Client IP in Certificates using keytool, client server application, ssl sockets
client server application, ssl sockets, client ip: Sandeep, If you are writing a client/server application using SSL Sockets (javax.net.ssl.SSLServerSocket and javax.net.ssl.SSLSocket) then it is very easy to get the IP address of the client. You just call the SSLSocket method getInetAddress(). It...

Java: Client/Server - Distributed Applications, joke search, server side code
joke search, server side code, datastore: Hi, Been very busy with my project, that I hardly find time to look at the questions. Sorry, the pressure has been heavy and I could not do so. About your project - In order to have a better understanding, lets break the whole project into simpler steps...

Java: Client/Server - Distributed Applications, joke search, stream usage
joke search, stream usage, level approach: there are two direct apporaches to this: 1. use Sockets, with these you can send bytes over a stream to another computer and they can reply. 2. use rmi, this is a higher level approach that allows you to send java objects to and from other computers. ...

Java: Client/Server - Distributed Applications, joke search, multithreaded server
joke search, multithreaded server, different computers: well u have to create a multithreaded server that listen to requests. so basically a thread that is just a while loop that listen to a port. and it listens to commands. like d for delete and a for add and g for get joke. after these command u can send...

Java: Client/Server - Distributed Applications, remote method invocation, client server connection
remote method invocation, client server connection, java remote method invocation: Morteza, There are several different good ways for two Java applications to share information over a network. The three simplest are: 1. Sockets (also called custom networking ) 2. Java Remote Method Invocation (RMI) 3. CORBA...

Java: Cloning of classes in core java, good morning sir, function java
good morning sir, function java, core java: Sometimes you need a copy of object which you want to change without affecting the orignal object (for example when you pass an object to a function). Java does not have anything like pass by value. So you will have to make a copy. Clone method will create...

Java: Cloning, clone method, java program
clone method, java program: The clone method (in object) will create a new instance of the class with all the values of the fields being identical. Classes can override clone to provide additional support when cloning. Cloning is often used to modify an instance while keeping a copy...

Java: COMPUTER ANIMATION, computer animation, programmer
computer animation, programmer, jobs: well it ranges. what you need to do is go to www.dice.com I am not sure if dice has the pay but it is for thats the website for tech jobs. I work as a programmer and i get about $65,000. It should be in the range of $40,000 to $55,000. Do you want to be an...

Java: Code Math Error, math error, point math
math error, point math, error source: Roxy, I can see where the error is occuring, but I do not know how to fix it. Java is not the problem here; as written, the calculation will fail on any platform that implements IEEE-standard floating-point math. The problem is with the calculation...

Java: Command, awt event, java awt
awt event, java awt, java rmi: I would try printing out the exact command that you are using in exec. You could pipe out the output of the command somewhere. I ve used that command before and it does work in code. The other possibility is that there was some kind of permission error that...

Java: Comments needed for Code, int mask, stdafx
int mask, stdafx, binary number: Hi, I think you got the wrong forum. This is an all java part of this site. Perhaps you should try going to the site www.allexperts.com and then click the links in the order of 1. Computing/technology 2. c/c++ 3. c 4. ask the question to one of the...

Java: Comments needed for Code, int mask, binary digits
int mask, binary digits, commandline arguments: /* * We need stdafx.h in order to do user input/output. */ #include stdafx.h /* * Entry point for the program. All commandline arguments are ignored. * The user will be prompted to enter a number. * If the number is 9999 the program will terminate...

Java: Compile java program from the console, semi colon, java program
semi colon, java program, ipconfig: the path enviromental variable is mearly a semicolon seprated list of paths to look for applications to run. If for some reason ipconfig is not being activated then c:windowssystem32 may have gotten removed from it (or a semi colon is missing). You should...

Java: Constructor and destructor, finalize method, system exit
finalize method, system exit, invocation: Yes, the finalize() method is called before the object is to gced. Note that the invocation of finalize is not gantenteed to be called at any paticular time. And may not be called if System.exit(int) is invoked before the object is gced. If you want an operation...

Java: Control scrolling in text area of Swings, button text, text areas
button text, text areas, viewport: First off text areas don t have scroll buttons. Instead they are placed in scroll panes. Then you mearly get the viewport of the scroll pane, and call scrollRectToVisible. E.g. JScrollPane pane = ... pane.getViewPort().scrollRectToVisible(new Rectangle(0,100,100,200))...

Java: Convert File data to Byte variable, codings, error message
codings, error message, fis: Hi, Try this: try { File dt = new File( enyrt.data ); FileInputStream fis = new FileInputStream(dt); byte[] byt = new byte[(int)dt.length()]; int tn = fis.read(byt); } catch(FileNotFoundException ex) { ex.printStackTrace();...

Java: Convert from integer to byte, java awt, image package
java awt, image package, mahmoud: Dear Mahmoud, Thankyou for your question. I would like to know, currently at which level of study you are? Send me the problem statement clearly, i.e. what do you exactly want to do with your image? As far as i ve understood, you will use 1- MemoryImageSource...

Java: Converting to Gray-Image and display it, gray scale image, public class test
gray scale image, public class test, java awt: Here is a sample that works, although it does not use the ColorConvertOp. My intial guess is that you are not completly loading the image before converting it. Sample: import java.awt.image.*; import java.awt.*; import javax.swing.*; import java.net.*;...

Java: Converting pixels into cm, jgoodies, int width
jgoodies, int width, centimeters: assuming you are using the jgoodies API... you can convert Centimeters into pixels, so if you want a random rectangle between 28 and 32 centimeters in size you could use: int width = random.nextInt(DefaultUnitConverter.getInstance().centimeterAsPixel(28,this))+1;...

Java: Convertion of C++ program in to Java, data base oracle, applicationserver
data base oracle, applicationserver, batch program: There isn t tool I m aware of that does this. And even if there were it wouldn t be perfect, aside from different api s, c++ can do a lot of things that java can t. C++ is a powerful lanuage while java is a safe lanuage. Just if you didn t know, you can...

Java: Core Java, run time error, core java
run time error, core java, constructor: Yes, it is possible to have a constructor public, default, protected or private! It will not lead to any kind of compile time or runtim error. You only need to remember and follow the rules of access., a constructor once private can not be called as X obj...

Java: Core Java, run time error, compiler error
run time error, compiler error, core java: Yes, you can give any access modifier to a constructor (including none). Also note that constructors do not override subclass constructors, so you may provide a constructor with the same parameters as a subclass and reduce its access. If there is a violation...

Java: Core java, class shape, shape public
class shape, shape public, oriented languages: Sumit, if you re instantiating a Subclass object and if the Superclass constructor calls a method that is overridden in the Subclass, the Subclass method will be called from the superclass constructor Yes, this is the correct behavior....

Java: Counting a method, class foo, compareto
class foo, compareto, public string: old way - public class Foo implements Comparable { String primaryKey; public int compareTo(Object o) { Foo foo = (Foo) o; //add counter here return primaryKey.compareTo(foo.getPrimaryKey()); } public String...

Java: CPU, proc filesystem, cpu utilization
proc filesystem, cpu utilization, processor systems: Meghala, There is no good portable way to do that. Every operating system provides different facilities for reading the CPU utilization. On Linux, for example, you can read a file from the /proc filesystem. On Windows, you can read entries from...

Java: Cpu, awt event, java awt
awt event, java awt, fileoutputstream: If you download the commandline process viewer from http://www.beyondlogic.org/solutions/processutil/processutil.htm and put the program in the same folder as the generated .class file, then you can use this program to get a simple task manager like interface:...

Java: Create a window in Java with 2 circles ramdomly move in the window, new timer, black circles
new timer, black circles, awt event: In order to draw a line to the corner of a circle you will have to calculate where that is (sqrt(2)/2 from center, or 1 - sqrt(2)/2 from the upper left). You can use g.drawString( String ,x,y) to draw a string, if you want you can use g.setFont(Font) to change...

Java: Creating an English-My Language dictionary in Java, language dictionary, hashmap
language dictionary, hashmap, difinition: Hi Kimsan, Since you already have your words in a file you can write a small utility class to parse it (see my first response), put the words in a HashMap (see my second response) and then serialize the HashMap (also in my second response). Then your dictionary...

Java: Creating two panels, setborder, new button
setborder, new button, hi mike: Hi Mike, The easiest way is to use 2 panels each with GridLayout: panel1.setLayout(new GridLayout(4, 4)); panel1.add(new Button( 1 )); panel1.add(new Button( 2 )); // ... add all buttons panel2.setLayout(new GridLayout(3, 3)); panel2.add(new Button(...

Java: Creation of Object, time exceptions, instance variables
time exceptions, instance variables, question sir: static methods and variables are independent of any object. Static methods cannot call instance methods, or use instance variables (unless they have an instance). It is considered bad form to call a static method from an instance of the variable, e.g. someInstance.staticMethod()...

Java: Custom Validation Script in Acrobat, validation script, sumbit button
validation script, sumbit button, software acrobat: Sorry. Just came back after a long vacation. Didnt check mails for long. Perhaps you should AcroJS. It can help you. Its similar to JavaScript with the added functionality to read PDF files. http://www.performancegraphics.com/Media/AcroJS.pdf http://www.aces.edu/ctu/techref/software/acrobat/5.x/AcroJS.pdf...

Java: How to calculate and show the remaining time left in a JProgressBar, minutes format, jprogressbar
minutes format, jprogressbar, string format: Well there are various formules you can use. A simple one is: time diff*bytes copied/bytes remaining int timeDiff = newTime - oldTime; int bytesCopied = currentCopiedBytes - oldCopiedBytes; int bytesRemaining = size - currentCopiedBytes; String format...

Java: calculating total harddisk utilization unging java, java versions, space allocation
java versions, space allocation, bug id: Previous java versions have a bug. http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4057701 Java 6 has a few methods though if you are trying to use it Check title Obtaining Space Allocation on Disks in the url http://java.sun.com/developer/technicalArticles/J2SE/Desktop/javase6/enhancements/...

Java: calender source code, calendar program, jar files
calendar program, jar files, source text: Hi, Usually applets need a runtime environment installed on your local machine. The client jar for your applet is downloaded to your machine and then executed from there. There is no limit as to how many files are in a calendar program. It varies based on...

Java: Why can I call an abstract method as follows?, abstract subclass, document builder
abstract subclass, document builder, abstract method: Izzzz - You can call the newInstance() method of the abstract DocumentBuilderFactory class because it is static. static DocumentBuilderFactory newInstance(); The newInstance() method returns an instance of some non-abstract subclass of the...

Java: How can I call my MyTimer's reset method to reset start time when MyTimer runs as a thread ?, public void reset, keeping track of time
public void reset, keeping track of time, time object: well. YOU MUST NEVER MESS WITH AT THREAD ONCE IT HAS STARTED. you must always use the start and interrupt method. if you do mess with a thread while it is runnig you can cause the system to lock. and all you can do is restart the computer if it is a big application....

Java: call toanotherprogram, java files, main string
java files, main string, println: You generally don t call one program from another (although you can) instead you generally call a method in a class to another one. E.g. public class p { public static void main(String[] args) { System.out.println( this is main in p ); ...

Java: calling client from EJB, jaspreet singh, home interface
jaspreet singh, home interface, jmx: Hi Naveen, see the server log for any errors during deployment. If you can see logs about your bean being deployed without errors, try to use the jmx console to see what is registered with JNDI. JMX Console http://host:8080/jmx-console Regards Jaspreet...

Java: i cant uninstall Java, ursoftware, thread exit
ursoftware, thread exit, java website: You could try download the full Java installation and install it (do not install from the net), then uninstall it. This might fix the error you get when uninstalling. Another option you could try is to use an uninstall program such as Your Uninstaller!...

Java: certifiate for signed applet, free certificate, life time
free certificate, life time, lionel: Hi, All certificates from well known vendors have a lifetime, and are not free. If your working on study project, then you can make a self signed certificate and use the same. Hope this helps. Lionel PS: Sorry, was on vacation, and could not access...

Java: change made to an object reference is local.. why??, stringbuffer objects, string args
stringbuffer objects, string args, object reference: Dheeraj, I m glad it worked :) Java is a very similar language to C, but having been created afterwards, it was restructured in several ways to make the language more accessible. One of the shortcomings of C was the complexity of pointers, as programmers...

Java: why we can change the value of a String variable when we put the String variable inside ArrayList ?, arraylist java, member variables
arraylist java, member variables, string fname: Izzzz - Do you think we have to remember what Class/Object can be modified, and what Class/Object cannot be modified? No, you don t have memorize it. Usually, it is okay to just look up the class in the Java documentation. However, there are...

Java: changin the appearance of a string, learning java, correct letters
learning java, correct letters, capitals: Dominic, Hmmm, this might be a little easier if I could see all of your code, but I ll try. In order to remember the count of correct and incorrect guesses, you need to add some member variable to your class. I would add two: ...

Java: changin the appearance of a string, hangman game, dalek
hangman game, dalek, question mark: I would suggest you to have two arrays, one to update the answer list and another to have the key. Initially the first array contains the key, and the answer array would contain ? marks. An answer from the user would search the key array, identify the...

Java: changing content inside a tag in a HTML file using Java, getattribute, filereader
getattribute, filereader, import java: well just use addAttribute, except use the special IMPLIED attribute. E.g. a.addAttribute(IMPLIED, new string ); or to be more explicit a.addAttribute(HTMLEditorKit.ParserCallback.IMPLIED, new string ); you can also use getAttribute to get this text...

Java: chars and strings, ch1, ch2
ch1, ch2, string value: String var = +ch1+ch2; This works since this statements resolves to: String var = ( +ch1)+ch2; which is equivelent to: StringBuilder sb = new StringBuilder(); sb.append(ch1); sb.append(ch2); String var = sb.toString(); You could also use: String...

Java: reply for checking Application..., runtime class, desktop application
runtime class, desktop application, program application: ok to execute a program what you have to do is : Runtime p = Runtime.getRuntime(); Process process = p.exec( D:\Windows\explorer ); that just open up a windows explorer. that is how you can run a program. now when i said app server it has nothing...

Java: "checking against the erased type" warning, interface code, generic type
interface code, generic type, type safety: Toly, I have a question about the warning I always get with Java 5: Type safety: The cast from Object to List String is actually checking against the erased type List , where List could be Map, or something else. Well, this warning...

Java: class access modifier and method access modifier, public class test, member variables
public class test, member variables, public int: Izzzz - If the class access modifier is not public, even though it s method access modifier is public, the method is not accessible by methods of other classes from different packages. No, not totally. If the class modifier is not public,...

Java: How to get a class in another classloader?, classloader, classpath
classloader, classpath, home server: This depends on how the classloaders are organized. If classloader A is an ancestor of classloader C (or the other way around), then you can simply compile C with A and reference it. However is they are sibling classloaders, you will need an instance (or a...

Java: class diagram, fire wardens, year computer science
fire wardens, year computer science, fire simulator: Hi, Sorry, I could not answer your question as I out of the country for a while. For the scenario given above, you may need to draw the following diagrams - 1. class diagram 2. use cases 3. state diagram to show the course of actrion across time The...

Java: class's signature ?, conventional usage, class members
conventional usage, class members, signature: Izzzz, For a method , we can say the method s signature , but for a class, can we say the class s signature ? You could say that, but it would not be conventional usage. People would not understand you. If you want to talk about all...

Java: cloning, cloneable interface, public implementation
cloneable interface, public implementation, clone method: Sahan, Classes cannot be cloned. The clone operation is only applicable to objects that are instances of classes. Objects can be cloned if their class satisfies these two conditions: 1. The class implements the java.lang.Cloneable interface....

Java: cloning in java, field reference, java types
field reference, java types, necessary objects: cloning is the copying of an object to create an identical object. The method clone() in Object makes a copy of the object by copying each field reference and primitive to the new object. In essence this is a shallow object. Implementors can override this...

Java: close() and flush(), input streams, output streams
input streams, output streams, heirarchy: it would be nice if you can flush as and when required. Now when you say top level stream, am not sure if you mean the top level as per the heirarchy of streams or based on the various streams that you are using. I would suggest that you do it individually...

Java: closing/ending JFrame applications, system exit, threads
system exit, threads: For the most part if you use dispose, the application may continue to run if there is other Frames on the screen, or any non-deamon threads. If you use System.exit, then the application quits, even if other frames are still on the screen. You could also just...

Java: closing a frame with a JButton, window listener, patient search
window listener, patient search, windowlistener: when the button is pressed simply call setVisible(false) then dispose() on the Frame. No need for window listeners. The window listener is only necessary if you plan to pop up a dialog asking the user to confirm closing the window (e.g. Save your Changes?...

Java: code, floating point numbers, input dialog
floating point numbers, input dialog, java awt: Danielle, Certainly you can write a Java program that compares two floating-point numbers and prints a statement about them. The code for writing it as an applet and popping up the dialog is far more complex than comparing the numbers. I m going to...

Java: code for allignment, einstein albert, left hand side
einstein albert, left hand side, allignment: Hi, There is no standard way but to calculate the number of characters for each of the columns that you require. as in this example you a name and a number. So in this case you may need a common method that finds the length of the name that you have append...

Java: Here is the code, mileage charge, instance variables
mileage charge, instance variables, dalquist: Hi, Can t compile the code. Need the Business and First classes. Could you post it? I have gone through the rest of the code though. Aside from the setTicket() method, I don t see any other place where SeatReserved is set to false. Did you try debug?...

Java: coding, integer parameter, string x
integer parameter, string x, string parameter: Danielle, This is very easy to do, but the simplest approach will be very inefficient. public String multiConcat(String x, int cnt) { String result; if (cnt 2) return x; for(int i = 0; i cnt; i++) { ...

Java: combobox value in JSP, jsp code, action document
jsp code, action document, combo box: put your index.jsp & 2nd.html in ROOT folder of tomcat and one more thing. When you change combo box field that changed value will appear in the text box. But if you want that value to remain in combobox also then change your index.jsp with following code....

Java: How to compare datetime (Urgen), d2 d2, calendar types
d2 d2, calendar types, calendar type: try this code that I picked for you... hope it helps /** * Calculates the number of days between two calendar days in a manner * which is independent of the Calendar type used. * * @param d1 The first date. * @param d2 The second date. * * @return...

Java: comparison b/w java and javascript, predefined, dependant
predefined, dependant, lionel: javascript is browser dependant! it is also interpreted. you can not make another language with it methods are inbuilt and the scope of making anything is within what is predefined java is platform independant. you can use it for a browser or as an...

Java: comparison, multiple operating systems, lanuage
multiple operating systems, lanuage, intergration: VB is an easier to learn lanuage, but is more limited. You can do many simple things in VB, while java doing the simple things might not be as simple, but will allow you more flexability. Java is more platform independent, getting things to work on multiple...

Java: compile .java code in Unix environment, javac command, java file
javac command, java file, external library: javac will use the newer of .java or .class files when compiling. If the code depends on any external library you will have to include the .jar into the classpath. For instance if the class that could not be found is com.apache.bcel.generic.JavaClass then...

Java: compiler, software houses, programming languages
software houses, programming languages, compilers: Your question is not clear? You are not making any sence. In any case there really are not that many choices in java. And for other I don t really study the quality of output generated. Usually I qualify compilers based on what features they have and how...

Java: compitition, java framework, robust systems
java framework, robust systems, platform independence: Thats perhaps the good question. Yes competition wise .net is giving tough competition to java. But that doesn t mean at all .net will wipe out java from market.If you compare java with .net its almost 5 years older to .net again.Also .net framework quite...

Java: component generated events, relevant method, component classes
relevant method, component classes, relevant methods: 1. This doesn t make any sence at all. 2. This is generally how it is done. 3. This is wrong. 4. This makes no sence. 5. You can do it this way, but you don t have to. 5. is a bit odd that the some of the base component classes (Component,Container,JComponent)...

Java: components in swing, performance penalty, jpanel
performance penalty, jpanel, swing: just call remove(component) on the jframe/jpanel to remove a component. If a component is already displayed and you add, remove, resize, or move an inner component, you need to call validate() when have finished the operations for the component to correctly...

Java: components in swing, component comp, jpanel
component comp, jpanel, swing: Hi, To remove a component from a JFrame or JPanel, use the remove(Component comp) or remove(int) methods in the JFrame or JPanel classes. These methods remove the specified component from the container. Whenever you add or remove components from a JFrame...

Java: concat two strings, character arrays, string concatenation
character arrays, string concatenation, string x: Prashant, I don t quite understand what this question is about. You cannot concatenate two strings using exceptions, String concatenation is Java very easy: String x = abc ; String y = def ; String z; z = x + y; Now, if you...

Java: concatenation in Textfield, gui calculator, scientific calculator
gui calculator, scientific calculator, graphing calculator: This is probably a design of the calculator. You cannot for instance just set the text. Since you want to add a 2 if 1 was pressed, but not if + was pressed after 2. So you need to keep track of a state for the calulator. If you are in the integer state for...

Java: I am confused with Cookie and HttpSession?I am confused with Cookie and HttpSession? Which one should I use?, jaspreet singh, s system
jaspreet singh, s system, session cookies: Hi, A cookie is a text file with a name, a value and a set of attributes. Cookies are sent from the server and saved on client s system. Whereas HttpSession is maintained at server but uses cookie for identifying client and session. Cookies can be disabled...

Java: I am confused with file IO APIs in java.io.*, could you tell me a general principle when we shoudl use buffered or stream etc.?, benifet, bufferedinputstream
benifet, bufferedinputstream, filereader: The stream you use depends on how you want to interpret or write the data. If you are using plain text then a FileReader (or FileWriter) will probably do. If you want to write or read data that stores ints,bytes,double, ect.. a dataIn/OutputStream is better....

Java: connect algorithm, two dimensional array, threshold value
two dimensional array, threshold value, alogrithm: Hi, I would do basically what you have done. However, arrays are known to be slow. Try using an ArrayList or the Arrays class, for example to store the data instead of an array. The arrays class is built for searching and sorting data. Bria...

Java: connect algorithm, two dimensional array, threshold value
two dimensional array, threshold value, alogrithm: If the points are fairly clustered you could create a 2 dimensional array of linked nodes. The first two dimensions would be a subsection of the grid, while the linked list would be all the points that fall in that area. That way you would only have to check...

Java: connecting classes, getter, private member
getter, private member, 5 months: you could defined the array as a private member in class A with public getter method. in B, you can create an object handle of A, and then access it as given below - A obj = new A(); obj.getArray() // or whatever is the method name that you may have. ...

Java: Why are constructors/descructors not inherited?, ctor, destructors
ctor, destructors, inheritance in java: Izzzz - In one weak sense, Java constructors are inherited. If you had the following code class A { public A() { System.out.println( In A ctor ); } } class B extends A { ...

Java: control invisible when repainting, awt event, java awt
awt event, java awt, content dimension: Hi Semeena, Your code is generally ok and the problem is not with the repaint but the fact that you set a null layout. Normally when you add a component, the layout manager starts listening to its property changes and it also listens for add/remove component...

Java: convert an audio file from 8 bit into 16 bit, dipu, main string
dipu, main string, import java: Hi Hetal, I am not sure what are your intentions but as per i think if you want to read the audio file. Then whatever you are reading you will be getting in byte array.Please try this out import java.io.File; import javax.sound.sampled.AudioInputStream;...

Java: convert from int to byte, rgb data, createimage
rgb data, createimage, bufferedimage: First, createImage accepts either png, gif, or jpeg format, not raw. For using raw rgb data use setRGB in a BufferedImage (after making one). Example of how to copy an int[] into a byte[]: import java.nio.*; public class Test2 { public static...

Java: convert urdu text to unicode, lib directory, european languages
lib directory, european languages, link thanks: Unicode is an encoding. Urdu is a language. If the text is encoded in a non-unicode encoding that supports urdu, you will have to know what that encoding is. Two urdu encoding that java has support for are Cp918 and Cp1006. These encoding are not installed...

Java: convert Word document to pdf, rtf,or html, nithya, word converter
nithya, word converter, word documents: Since word documents are a closed format, its somewhat difficult to help. The only suggestion is to use open office s api http://www.openoffice.org which have support for word documents. Posslby look though the word converter and create code which does what...

Java: how many copies of the attribute, abstract class, instantiated
abstract class, instantiated, public void: Izzzz - With the code you sent, there will be one copy of the method testMethod in memory, and no copies of the member variable i. If somewhere else in the code instantiates an instance of Sup, Sub1, or Sub2, there will be one copy of i for...

Java: Are there copy constructor and assignment constructor in java?, joshua bloch, copy semantics
joshua bloch, copy semantics, method implementation: Izzzz - Are there copy constructor and assignment constructor in java? There is such a thing as a copy constructor in Java, but it does not play the special role that such constructors do in C++. A copy constructor in Java is just like any...

Java: copy java data to C structure, dynamic link libraries, java native interface
dynamic link libraries, java native interface, target platform: Shyamal, i m facing a problem that i have to copy java structure to C structure and C structure back to Java. Yes, this can be done, but it is rather painful. If you mean for the Java structure and the C structure to be in the same program,...

Java: copy java data to C structure, c pointer, c structure
c pointer, c structure, java side: Well lets first look at possible incompadibilities: 1. char[] in C is ASCII while java s String is unicode, so you might lose some special characters in the process. 2. age in java is a String where it is a char in C. The string might not even be a valid...

Java: core java, strict school, context changes
strict school, context changes, abstract classes: Ok, let me tell you what I told during my Sun Certified Java Developer Exam for this question... it goes like this! An abstract class would allow/permit one to have a super just as in the interface version but for one important thing! An interface always...

Java: core java, maximum parameters, objectinputstream
maximum parameters, objectinputstream, core java: Introspection is a spefic kind of Reflection, in that it only tries to determine information at runtime about a class or an object. E.g. if you iterate though all the methods of an unknown class, and see any that start with get you might assume that this...

Java: core java, premain, java vm
premain, java vm, functional java: Yes it is possible to have a fully functional java program without a main, however it is a hack to do so, and it should only be noted for security purposes. You can execute code in the static block of a class. This static block will be executed before the...

Java: core java, unchecked exceptions, legal void
unchecked exceptions, legal void, stringbuffer: 2. The act of either throwing a checked exception or calling a method which declares a checked exception in its throws clause requires that either, the exception appears in a try-catch block which a catch statement that includes either the exception or a subclass...

Java: core java, smooth as silk, executable jar
smooth as silk, executable jar, class path: hi, very busy with deliveries to my clients. sorry. the answer is yes. all you need to do is make a file and give the following contents sample.txt ---------- Main-Class: package.MyClass Class-Path: classpath1 classpath2 . then you issue...

Java: core java, string args, java main method
string args, java main method, commandline parameters: main method can be in any package, in any named class. Main is a static method, there is no overriding. You can have main in a sub class and its super class. The String[] args parameter is the commandline parameters that the program was started with. E.g....

Java: core java, demo class, class demo
demo class, class demo, multiple inheritance: Hi Karthik, Abstract classes in java are used for soul purpose of inheritance because abstract classes can not be instantiated.How ever we can create the object of abstract class by simply inheriting it.In order to create a abstract class in java...

Java: core java oops concept, common interface, time example
common interface, time example, abstract class: Hi, Answers inline with your questions - 1.what is the main difference between abstract class and an interface? an abstract class can bridge two different classes that have no relation at all. an interface is very strict, even if we have to bridge,...

Java: core java question, environmental variables, java question
environmental variables, java question, core java: first issue the command javap -classpath .; optionalClasspathEntries className to check if your main method is present. If its not then you need to add the method. If present, issue the command java -classpah .; optionalClasspathEntries className...

Java: core java+static methods, static variables, member variables
static variables, member variables, static methods: Hi, Non-static methods are associated with an instance of the class. They typically operate on state (member variables) that s specific to on object. They represent the behavior of that one object. Static methods are associated with the class as a whole....

Java: on core java, java source code, package hierarchy
java source code, package hierarchy, class foo: Ram, A Java class must be defined in a file of the same name when the class is declared public. The reason for this is simple: so that the compiler can find it. There is more. By default, source and class files for a package should normally reside...

Java: corejava, math package, arithmetic operation
math package, arithmetic operation, java math: Lets first browse and see the classes contained in the java.math package and the class reference: http://java.sun.com/javase/6/docs/api/java/math/package-frame.html http://java.sun.com/javase/6/docs/api/java/lang/Math.html If you notice the Math...

Java: corejava, array references, instance variable
array references, instance variable, corejava: Kumara, An instance variable is a field or member variable of an object. For example, in the code below, x is an instance variable, but count is not. public class Point { float x; float y; static...

Java: not getting correct output, java awt, awt event
java awt, awt event, frame class: This is the expected behavior. You are creating an image with a filter, any changes to the image will go though the filter when the image is displayed. If you want to make changes to the image you should use a BufferedImage (http://java.sun.com/javase/6/docs/api/)...

Java: counting character in a file, string args, bcbc
string args, bcbc, int c: you can keep them in an int[], where the index into the array is the count of that letter. E.g. (This assumes all characters are lower case). int[] charCount = new int[26]; ... charCount[ a -c]++; //Increment the index into the array based on the distance...

Java: counting characters in a file, string args, initial code
string args, initial code, bcbc: J - There are several ways to approach this problem. First, let s break it into its constituent parts: 1. read characters from a file 2. count occurrences of each character 3. print the counts for each letter and digit but not other...

Java: cpu utilization-reg, awt event, java awt
awt event, java awt, exact code: try this modified code import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.io.BufferedReader; import java.io.File; import java.io.FileOutputStream; import java.io.InputStream; import java.io.InputStreamReader; import...

Java: how to create a cirle, drawing circles, graphical user interface
drawing circles, graphical user interface, 3 circles: Ditto, There are a lot of issues implicit in your question. I ll try to address a few of them. 1. Drawing a Circle For drawing circles and other shapes, you need to use the java.awt.Graphics object. You get one from a java.awt.Canvas...

Java: How to create an English to my nation language with Java, language dictionary, nation language
language dictionary, nation language, happy learning: perhaps you can visit this site.. and read the sample given there. http://java.sun.com/docs/books/tutorial/i18n/TOC.html#intro welcome to the world of i18n *smiles* [means internationaliztion, called as i18n becase there are 18 letters between i and...

Java: create folder in java version 1.3, success failure, code snippet
success failure, code snippet, java version: Okay he s the update for how to do it for any directory: String myNewDir = C:\Daf\Cool\file ; new File(myNewDir).mkdirs(); Daf ------------------------------ Hi Nelson, It s not something i ve had any need to do in the past, but something...

Java: create a jar file using JCreator, jar tool, jar archive
jar tool, jar archive, jar file: Hi, I don t personally use JCreator so I m not so familiar with it. I did download it have a quick look though. It is really unclear how to create a JAR file using JCreator. The documentation is terrible. However, I think that once you have enabled the...

Java: how to create a random question?, getpassword, random question
getpassword, random question, string password: To generate a random number you can either: 1. use Math.random() to get a double and use that e.g. int randQuestion = (int)(Math.random()*10); 2. use the Random class: Random random = new Random(); int randQuestion = random.nextInt(10); getPassword...

Java: creating an IDE, java source program, java apps
java source program, java apps, java ide: Hi, What you need to do is download the source code for some of the IDE s on sourceforge. Look through the source code to see what others have have done and follow the same lines of development, maybe adding new features or improving the code. Bria...

Java: creating a program macro to fill in web forms?, web forms, google
web forms, google, web browser: The biggest problem in this is the controling web browser. Java can contact the web page and log in ect... without a web browser. I know someone who made google to automated searches for him, but he did that in c++, which im not too keen on. It might be...

Java: creation of object in interface, concrete class, long vacation
concrete class, long vacation, implementation: Sorry. Just came back after a long vacation. Didnt check mails for long. An object cannot be created because it all methods do not have an implementation. Its like just creating a dream of what you would like to do without having anything concrete. How...

Java: critical error and RuntimeException, runtimeexception, critical error
runtimeexception, critical error, elegant solution: Izzzz - If a critical error occured, and I want the application to stop, then can I just throw a RuntimeException to indicate that? You can, but that wouldn t be the most elegant solution. If an error of some kind occurs, it is best...

Java: crsystal report in JSP, jsp project, external tools
jsp project, external tools, crystal report: I am afraid i cant help much on this since there isn t a direct way with which you can create a crystal reports.For those things you have to use external tools here is one link for the same http://www.businessobjects.com/products/reporting/crystalreports/default.asp?intcmp=corphp_c...

Java: cursor, toolkit tk, custom cursors
toolkit tk, custom cursors, point 0: Hi Sarah, First of all, if you re using Windows, the cursor image must be sized 32x32. This is a cursor size supported by the OS. I don t remember whether 16x16 is supported, but I guess it s not, because all my custom cursors from years ago are 32x32 -...

Java: cursor, toolkit tk, public class test
toolkit tk, public class test, tk toolkit: Best shown by example: import java.awt.image.*; import javax.swing.*; import java.awt.*; public class Test { public static void main(String[] args) { JFrame frame = new JFrame(); Toolkit tk = Toolkit.getDefaultToolkit(); //Creates...

Java: What is cyclic definitions in Java? is it still exist in j2se5.0?, bug id, time error
bug id, time error, bug report: It occurs when a class attempts to implement itself. A cyclic definition is not allowed in jdk1.5 The compiler picks up the relevant compile time error and throws to the developer. It was a problem earlier... Check this bug report http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4123500...

Java: Data Binding Java XML, xml schema, xml library
xml schema, xml library, jaxb: Been busy. Could not check mails for a long time. Sorry. Both have advantages and flaws. this link should give you an idea.. see the graphs. http://www-128.ibm.com/developerworks/xml/library/x-databdopt2/ This link provides the fact that both support...

Java: Data Encryption, java tutorial, java sun
java tutorial, java sun, types of data encryption: Hi, Plese refer to the documentation on the topic - security in the java tutorial in the site http://java.sun.com For your information, all types of data encryption is supported by java be it RSA or MD5 or whatever... Since, the topic is huge, it is better...

Java: Data Encryption, security packages, java security
security packages, java security, java sun: Yes there is enncryptions rotinues in the java sdk. Look at the documentation for java security packages: http://java.sun.com/j2se/1.4.2/docs/api/ There are also several extensions that sun provides. I m not very familiar with data encryption to really...

Java: Data Extraction and analysis(HTML parsing), java rule engine, galal
java rule engine, galal, gmail: Hi, The problem that I foresee is the arrangement and the way data is represented in each web page. One site may display data completely as images and a little text, another in a verbose manner, another as reports, another may have certain data spelt in a...

Java: Data files outside of jar files, null pointer exception, jar file
null pointer exception, jar file, jar files: First you cannot use getResource to get a writable file. You can only read from these resources. Although you can edit the jar file, this is not recomented. You can use File to access local files. I recomend using the Preferences API instead. See: http://java.sun.com/j2se/1.5.0/docs/api/java/util/prefs/Preferences.htm...

Java: Data link layer protocol, link layer protocol, program timers
link layer protocol, program timers, link protocol: well you kind of have a big problem there. 1. you cannot do it in java, it has to be done in C. Also UDP does not do ACK packets, that is TCP. And you will have to have have some kind of simulator to do the code in java. So here is what you can do. client...

Java: Database, java threads, application error
java threads, application error, time programming: Hi Andrew, Sorry I was busy with my project. Hence, I could not answer this question immediately. To make a database using java I would suggest you to look into the following topics.... * File handling * Concurrency control (look at www.javaworld.com...

Java: Databases and GUI's, candice, stomach
candice, stomach, laugh: LOL that was the funniest sh*t I ever heard. When i read it I laughed for about 20 min. Water was coming out of my eyes and my stomach was cramped. I thought I was going to die... So I picked up my laptop from off the floor, and I usually just decline to answer...

Java: Date Conversion, public static string, pattern string
public static string, pattern string, string pattern: Hi, Assuming that you want to get a String representation of the Date, try this: /** * Converts a date to a string based on a code SimpleDateFormat /code pattern. * p * pre * String s = dateToString(theDate, yyyy/MM/dd ); * /pre...

Java: Date conversion, test reader, java text
test reader, java text, inputstreamreader: try import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.IOException; import java.text.SimpleDateFormat; import java.text.DateFormat; import java.util.Date; class test { static public void main(String[]p) throws...

Java: Date Format, public static string, sdate
public static string, sdate, indexof: An example - public static String convertDB2Date(String sDate) throws MyException { try { if (sDate != null && !sDate.equals( )) { if (sDate.indexOf( - ) != 4) { SimpleDateFormat df = new SimpleDateFormat( MM/dd/yyyy ); Date du...

Java: Date Problem, java source code, gregoriancalendar java
java source code, gregoriancalendar java, mail id: consider adding this as a bug in the java bug database... there is a similar bug in the java site namely... http://bugs.sun.com/bugdatabase/view_bug.do;:YfiG?bug_id=4398844 I would suggest you send a code snippet to me to confirm if its a bug before you...

Java: DateTime Convertion, default constructor, api java
default constructor, api java, java text: Most of this can be performed in the DateFormat class and the Date class. See the parse and format method to convert to/from a Date and a String. If you use the default constructor for date it is created with the current time. You can also get the current...

Java: Dear,I have a library..., java native compiler, java bytecode
java native compiler, java bytecode, excelsior jet: Hello Hany, Good questions. 1. A lot of people are feeling the need to directly convert java bytecode to machine code, hoping to squeeze out some performance. What you need is called java native compiler (how intuitive) I have a friend who started...

Java: Dear Sir,Can you tell me..., test jar, java bean
test jar, java bean, command option: Hi, Please consider if the following steps were done crrectly - 1. Have you added the Main-Class attribute in the manifest file? along with the Class-Path attribute? 2. While you created the jar file, did you create the jar with the attribute -fm as...

Java: Declaring Methods Outside of Classes, scope resolution operator, method definitions
scope resolution operator, method definitions, object oriented programming: hi, You cannot declare anything outside a class unless it another class or an interface or an enum. I think you have misunderstood the example in the book. In java a method cannot be declared outside a class whether static or non static, it has to be within...

Java: Definition of JRUN, java function, jrun
java function, jrun, cold fusion: JRUN is a webserver. It runs on java. The easiest way to stop jrun is to just choose Stop from the Default Server tray icon. If JRun is running as a service, you will need to stop the service from the Services Control Panel or locate the batch that stops...

Java: Delete of a record in a pgm j2se, jdbc odbc, query expression
jdbc odbc, query expression, private connection: Your delete needs a from e.g.: Delete From Empleados where IdEmpleado=3 Also you should not use string conncatnation when creating sql statemetns, instead you should use preparied statemetents, using string conncatnation leads to security problems. ...

Java: Deploying & running of WAR files into Apache Tomcat, tomcat apache, ant tasks
tomcat apache, ant tasks, tomcat server: Amit, Well, deploying web applications to a Tomcat server is basically the same on all platforms. First, you have to know the base directory for web applications on your Tomcat installation. This will normally be set as part of the Tomcat configuration,...

Java: Developer's Productivity, experence, comman
experence, comman, development career: This is something that comes with experence. If the job is expecting you to complete a task that takes 12 hours per day on time, then you simply need to find a job where this is not an expecation or you will just have to tell your manager that the timeframe...

Java: Developing Rule Engine in Java, java byte code, dynamic classes
java byte code, dynamic classes, basicly: The only rule based lanuage I ve had any experence with is OWL (and DAML). For that I used the jena library. If you want to generate java classes on the fly, then (depending on how you want to do it) you can use the bcel library to generate classes and then...

Java: Dictionary, ms word documents, java inputstreamreader
ms word documents, java inputstreamreader, big endian: MSWord is a bit complicated, since there is no easy way to get at the format. What you can do is save the document as plain text and choose an encoding that is compadible (unicode (Big Endian) is the safest). Then create a java InputStreamReader with the same...

Java: Diff between weblogic server and tomcat server, jaspreet singh, tomcat server
jaspreet singh, tomcat server, jsps: Hi Praveen, Tomcat is a webserver where you can run your JSPs and Servetls whereas Weblogic is an Application Server supporting JSP, Servlets and EJBs...basically J2EE compliant server. Use of the server depends on your requirement. Also you must know...

Java: Difference Between Synchronised Method and Synchronised Object, deadlock situation, block construction
deadlock situation, block construction, private collection: Anoop, The simplest way to avoid deadlock is to make all the methods of your object synchronized. However, if you have just one method where the Collection gets updated, then you can use a synchronized block: private Collection mycol;...

Java: Dijkstra algorithm, algorith, shortest route
algorith, shortest route, shortest path: Well I can help you but you have to help me help you. tell me what you do not understand. I will help you greatly but which website did you see that i did dijkstra algorithm? The algorith is simple just keep track of where you are and mark the shortest path...

Java: Disable linewrap in JTextPane, deadend
deadend: If you want the ability to toggle the line wrapping, then create a boolean flag for the wrapping and override the method getScrollableTracksViewportWidth as follows: public boolean getScrollableTracksViewportWidth() { if (lineWrap) return...

Java: Disable Tristate check box node in a Jtree, jtree, renderer
jtree, renderer, checkboxes: A shared component is generally used to render each item in the JTree. If you disable one node, you are in fact disabling them all (and you may not see the result until the tree is repainted). The cell renderer is going to need to keep track of this. Tri state...

Java: Disabling cache, jaspreet singh, web server windows
jaspreet singh, web server windows, servlets jsp: Hi Sony, Try setting the third one also i.e. DateHeader... response.setHeader( Pragma , No-cache ); response.setDateHeader( Expires , 0); response.setHeader( Cache-Control , no-cache ); Have a look at the following link: http://www-306.ibm.com/software/webservers/appserv/doc/v20dcstd/doc/howto/itcache.html...

Java: Display Arabic Data in Java, positive reply, java file
positive reply, java file, class path: You haven t specified whether you have data in your source (.java) file or it is coming from other source (like database). If you have it in your source file, you have to compile files using encoding which supports arabic. Whatever the case might be, you have...

Java: Don't know why I'm getting a null pointer exception, null pointer exception, temp employee
null pointer exception, temp employee, parsedouble: Hi, When I instantiate an array of objects doesn t that instantiate each object of the array? - No it does not. The three elements in the array are still null. See the comments I have added to your modified code below for more details. import...

Java: Doubt in Struts, business logic, javabeans
business logic, javabeans, ejb: Hi Sunil, Your initial understanding - ActionServlet as controller, JSP as view and Javaobject /EJB as model is absolutely right. If you write business logic in the action subclass it is bad design, but yes it does become the model in that case. ...

Java: Doubts -reg[Applet and Swing], payroll management, learning java
payroll management, learning java, internal functions: 1) if you are going to have it on the web use an Applet, otherwise use swing. 2) consider use a form desiginer such as netbeans. See a tutorial on using passwords: http://java.sun.com/docs/books/tutorial/uiswing/components/passwordfield.html 3) see:...

Java: Doubts regarding creating an application, commercial desktop, search application
commercial desktop, search application, desktop search: Aasia, Java can be used to create an application for searching for files and folders. However, it probably won t do as good a job as a commercial desktop search application such as Copernic desktop search or Google desktop search. That s said, there...

Java: Download files using java.net package, proxy address, filewriter
proxy address, filewriter, input url: Prakash, Part of your code is correct, but the part that deals with web proxy address is wrong. In fact, it has a serious problem. Getting the proxy address - You have this line of code: InetAddress proxyAddress = InetAddress.getByName(...

Java: Drag and Drop audio and video files from windows explorer to Applet?, java sun, video files
java sun, video files, java util: In order to allow drag and drop to do anything usefull with Applets it must be trusted by the user. This involves signing your Applet and having the user accept a security warning that your Applet might be dangrous to their system. Once that is out of the...

Java: How the Driver Manager come to know that Driver is Loaded., string classname, security checks
string classname, security checks, static class: Been busy with a project delivery. Missed your question. The Class.forName method as per jdk1.4 implementation goes something like whats given below. My answers are inline with the code as // PJL comments - Methods in Class.java ---------------------...

Java: How to get data from another Frame, public static void, dosomething
public static void, dosomething, jlist: Hi, In your second frame, you need to add a ListSelectionListener to your JList like this: jList1.addListSelectionListener(new ListSelectionListener() { public void valueChanged(ListSelectionEvent ex) { listChanged(ex); } }); ...

Java: data stucture - binary tree, lecturer
lecturer: If you write a balanced binary tree in any order to disk, read it back and reconstruct the tree in the reverse order, I don t see any reason why it should not create the original structure. The statement your lecturer has made seems a bit strange. Can you...

Java: database connection thru jndi error, public void init, oracle jdbc driver
public void init, oracle jdbc driver, jakarta tomcat: Sorry been very with projects that I am not in a position to read or write mails. Anyways, since the time is less, I do not have the oracle and tomcat as a resource in hand and I still want to help you, you may try reading the link http://forum.java.sun.com/thread.jspa?threadID=454056&messageID=2068123...

Java: date - Java, hh mm ss, dd hh
hh mm ss, dd hh, string args: Firstly a date object will always show in the format EEE MMM dd HH:mm:ss zzz yyyy [reference: http://java.sun.com/j2se/1.5.0/docs/api/ Look for SimpleDateFormat under java.util package] eg., Tue Nov 04 21:53:43 EST 2003 or Sat Jan 21 00:07:00 IST 2006 ...

Java: What debugger do java developers usually use?, slow segments, jbuilder x
slow segments, jbuilder x, memory leaks: Hello Izzzz, I hope you have become quite proficient with java by now. Debugging java can mean various things. From simple logic bugs, to memory leaks; the debugging can vary in complexity. One of the powerful features of java is that the language...

Java: declaring Integer.parseInt(stdin.readLine()), readline, error line
readline, error line, ioe: Hi, Busy with a project delivery. Sorry I am answering late. The problem with the ocde is that you need to get the input from the standard input. A sample line that needs to be inserted ahead of your line the error line is BufferedReader stdin = new...

Java: define the basic of java, java virtual machine, java files
java virtual machine, java files, java class: they wanted to create a language that can run on any OS. so they created a program that runs bytecode(machine language... 1001001100101) then this was called the java virtual machine. this takes any java like code and turns it into bytecode and then executes...

Java: design & code, java utility, two steps
java utility, two steps, lionel: Hi, Write a method to read a file and returns a flag. With this basic resource, we can now start the program. Firstly, read the master file for a given key, the method returns its flag. follow it with the transaction file and get its flag for the given...

Java: design pattern, jsp servlet, proxy pdf
jsp servlet, proxy pdf, design architecture: Sreedhar, Well, I m no expert on design patterns, but I ll try to answer your questions. 1.which design pattern is used when the entity bean is in tx, but it commited to passivated and then activate again tx starts to make security over...

Java: desktop file password, encryption mode, file password
encryption mode, file password, jar file: sorry had problems with my net connection and I just saw ur mail... you may not be able to directly set a password on the file but you could try something like this 1. wrap your file in a jar 2. write a java application that prompts the user for a password....

Java: desktop file search, java commands, independent method
java commands, independent method, javac: The code segement is somewhat incomplete. I did not recieve any compiler warnings when I tried to compile that code. To find the file you would have to use a recursive like method. E.g. (An example to find a file by its exact name, does not do error checking)....

Java: How to determine if an application has bound a socket, message queue, determinator
message queue, determinator, datagramsocket: I really have not used JSM, but if it is a system wide app, there is probably a way to determine if its running in its API. As far as determing if a Port is bound, I don t know, and I would advise aginst this aproach since the port could easily change....

Java: dictionary, dictionary program, john ram
dictionary program, john ram, tony thomas: You can use the Arrays class e.g. import java.util.*; ... Vector people = new Vector(); people.add( tom ); people.add( dick ); people.add( marry ); ... String[] peopleArray = new String[people.size()]; people.toArray(peopleArray); Arrays.sort(peopleArray)...

Java: What is the difference between ActionListener and MouseListener?, actionlistener, mouselistener
actionlistener, mouselistener, default button: The actionListener is called when an action is performed. I.e. a button is clicked or the components in some other way determins that an action happened. The actionListener may be called when the user click the button or it might be called when the button...

Java: What is the difference between BigDecimal and Double? is BigDecimal obsolate?, bigdecimal class, api docs
bigdecimal class, api docs, integer fields: BigDecimal is not obsolete! It allows greater preceision than Double! Compare the api docs that mention * Double- The Double class wraps a value of the primitive type double in an object. An object of type Double contains a single field whose type...

Java: What is the difference between creating object by using new and newInstance ?, minor differences, footprint
minor differences, footprint, functionality: Izzzz - What is the difference between creating object by using new and newInstance ? There isn t any theoretical difference, both objects will be created in exactly the same way and with exactly the same footprint. In practical terms,...

Java: difference between .eqauls() method and == operator, doubt thanks, java programmers
doubt thanks, java programmers, string object: Hi, This is something which confuses a lot of Java programmers. equals() is a special method that compares the properties between two objects. == tests whether two reference variables are the same. Example. class Equals { public static...

Java: what is the difference between Floating-point numbers and Floating-Point Literals ?, floating point numbers, java language specification
floating point numbers, java language specification, java source code: Izzzz - what is the difference between Floating-point numbers and Floating-Point Literals ? A floating-point literal is a textual representation of a real number. Literals appear in Java source code, and must be processed by the compiler....

Java: should I declare result as instance variable or local variable?, automatic memory management, null pointer exception
automatic memory management, null pointer exception, features of java: Izzzz, should I declare result as instance variable or local variable? In the example you ve shown, a local variable is probably the correct way to declare the result. You should make something an instance variable only if needs to be...

Java: What is the difference between implicit conversion and casting?, explicit type conversion, implicit conversion
explicit type conversion, implicit conversion, implicit conversions: Izzzz, What is the difference between implicit conversion and casting? Casting is an explicit type conversion, specified in the code and subject to very few rules at compile time. Casts can be unsafe; they can fail at run-time or lose...

Java: What is the difference between 'java' and 'javaw'?, javaw, daf
javaw, daf, error messages: Heya Izzz, both applications will run your program, and are very similar, but have one key difference - java runs it through a Java Console, while javaw does not. The console is there mostly for text programs - for example, all your print statemements...

Java: What is the difference between reflection and introspection ?, objective c, introspection
objective c, introspection, language ability: Izzzz - They mean mostly the same thing, but can be used slightly differently. A language that has introspection has the ability to examine the types of objects at run-time, and occasionally the ability to influence or modify those types. Objective-C...

Java: What is the difference about synchronize between case 1 and 2 ?, class demo, input parameters
class demo, input parameters, example case: Izzzz - In your particular code, there is not much difference between case 1 and case 2. Both of them result in the method() being called, and both acquire the monitor before the body of the method is executed. However, in general there is a...

Java: What different purposes do 'class access modifier' and 'member access modifier' serve respectively,, mya mya, member variables
mya mya, member variables, java package: Izzzz - Class access modifiers affect whether a class can be accessed by code from outside its own package. If you have two classes in the package P1: P1/A.java package P1; public class A { ...

Java: Is digital dice possible ?, pseudo random generator, pseudo random numbers
pseudo random generator, pseudo random numbers, random generators: Leon, It is certainly possible to program a computer to simulate rolling dice, tossing a coin, or doing other forms of random generation. While most computers cannot produce true physical random numbers, like dice can, they can produce unpredictable...

Java: Two-dimensional arrays, java text, df2
java text, df2, random function: Hi, Say for example your matrix has numbers from 1 to 50. Get 10 random numbers using (Math.random() * 100) and round up, down, etc as needed. Store these in an array for example. Lopp through the matrix array checking against the random array. If...

Java: diplay location of a drawn circle, public void paint, awt event
public void paint, awt event, java awt: Tim, The sequence you describe for creating a Jar file is correct, according to the JCreator web site. However, that sequence will not create an executable Jar file. You have two choices: use the command line tool sequence I described in my last...

Java: display arabic language, oracle jdbc driver, oracle client
oracle jdbc driver, oracle client, arabic characters: There might be 2 cases when this happens 1. Browser is not able to display arabic characters 2. Server is not able to serve arabic characters Try this. In your jsp, open a file with utf-8 char set and write your data into the file. Then open the...

Java: displaying the content of HTML File, awt event, java awt
awt event, java awt, javax swing: You are probably getting an EOFException because there is an empty or malformed file at C:Documents and SettingsAIaddresses.dat. You should probably get rid of the file until you implement a save method. I don t know why you are getting an UnknownHostException....

Java: displaying letters, learning java, capital letters
learning java, capital letters, capitals: It does not appear you are actually changing display. Strings cannot be modified, calling toCharArray() makes a copy of the charaters for you, so changing the array does nothing. Consider using a char[] for display, and using new String(char[]) to convert...

Java: displaying a tamil, ms access 2000, drivers search
ms access 2000, drivers search, java swing: Jisha, There are a couple of reasons why this could take place, and I m not sure which one is affecting you. However, the problem is generally well-known, and has existed for years as a known bug in the default Sun JDBC-ODBC bridge driver. So, if...

Java: displaying a web page, java exe, java access
java exe, java access, new version of windows: You may need to configure your firewall to allow java access to the internet. The new version of Windows will block most applications from accessing the internet and provide a warning that the application is attempting to do this. If in this warning someone...

Java: .dll com component, programming link, vb 6
programming link, vb 6, java sun: I would strongly suggest you to call the dll method from your java code with the help of the method loadLibrary Refer the site on an understanding on the same topic with some samples. http://java.sun.com/developer/onlineTraining/Programming/JDCBook/jniexamp.html...

Java: Why doesn't the following code print Equal?, java language specification, public class test
java language specification, public class test, implicit conversion: Izzzz - Implicit conversion to String only happens for the + operator, as described in sections 5.4 and 15.18.1 of the Java Language Specification. Any other time you want the conversion to happen, you must either use a + or apply the toString()...

Java: I don't understand the following statements, could you please help?, ternary operator, boolean value
ternary operator, boolean value, true value: a ternary operator is the equivalent of an if statement... where the syntax would be flag (a boolean value/condn) ? (value if true) : (value if false) Now, if you break the statement into smaller parts, it would be proccessed as down ? 1 : -1...

Java: double to array, decimal place, decimal places
decimal place, decimal places, main string: Heyas Nguyen, Unfortunately there s no class in the library which does this, but it s a pretty concise and straightforward thing to code yourself. :) The program below shows how to do if for 0, 1, 2, and 3 decimal places, and i ve also included a general...

Java: double value, math log, demo program
math log, demo program, decimalformat: Nguyen, The methods work fine in exception of small/large numbers. is there a way to say output to 3 decimal places for 1.34828328348E20 Okay, you are trying to parse a number to N significant figures! That is different than decimal...

Java: doubt abt java socket.., graphical user interface, java socket
graphical user interface, java socket, socket program: In essence the java chat program has two parts: * actual socket connectivity, and a straightforward graphical user interface. * In programming the application, the two parts were implemented separately, later combined for the final version. * Using the...

Java: doubt in exception, time exceptions, exception error
time exceptions, exception error, int value: Hi, Compile time exceptions/errors normally occur when code is written badly or is simply wrong. e.g. File.createTempFile( log , tmp ); // Will throw a compile time exception/error because it can throw an IOException which must be caught Runtime...

Java: doubt in SCJP 1.4, runtimeexception, valid option
runtimeexception, valid option, test point: The answer is not B, it is A. Since test() calls runTest(), and runTest() throws an Exception that is not an instance of RuntimeException or Error, the runTest() call must either be in a try-catch block where the TestException (or a superclass) is declared...

Java: one doubt, syntax errors, runtime error
syntax errors, runtime error, lionel: Hi, By compilation java removes most of the problems like syntax errors and also ensures that the code that you write can work on any platform. Interpretation allows you to run your program faster and is devoid of all the tasks that the compiler needs to...

Java: drag and drop animation, awt event, ball diameter
awt event, ball diameter, java awt: There are various problems with this code, like a missing } for the end of your mouseDragged method. You removed some methods like mouseExited. Here is code that compiles, but it is still not complete. import java.awt.*; import java.awt.event.*; import...

Java: drag and drop from/to windows native to/from JComponent, true comments, native platform
true comments, native platform, quick reply: Dear Zhenwu, Thankyou for your question again. Well, i am always available to help the learners in Java. Zhen, i guess you should check out the following site, it has quiet a rich collection of book on Java. http://www.kickjava.com Look for the...

Java: Cannot draw image, java awt, image toolkit
java awt, image toolkit, mediatracker: The toolkit creates the image, but it hasn t finished loading the image when you are drawing it. You have to wait for the image to finish loading before you can draw it. You can do this through the MediaTracker e.g. java.awt.MediaTracker tracker = new...

Java: dynamic array/ array list of arraylists, array array, dynamic array
array array, dynamic array, list of lists: If your using java 1.5 you can use generics... e.g. ArrayList ArrayList String myList = new ArrayList ArrayList String (); ArrayList ArrayList String row1 = new ArrayList String (); row1.add( A ); row1.add( B ); row1.add( C ); myList.add(row1);...

Java: dynamic array initialization, dynamic array, java command
dynamic array, java command, users input: Heya Prashant, Okay so am I right thinking you ve never programmed before? First of all, have you seen main methods that look like this: public static void main(String[] args) { } A method like this will be present in most programs you ll come...

Java: EasyQ, j2se, building a website
j2se, building a website, networking: Hi, J2SE which is the core of Java is the most used part of Java. It contains all the basics, GUI building, IO, networking, etc. Design of a website can even be on paper, a drwing of what you want to do. Then you build it by writing the code. Bria...

Java: EJB-calling a entity bean, java rmi, entity bean
java rmi, entity bean, 128 mb sdram: Hi Naveen, make sure the jnpserver.jar is in your classpath %JBOSS_HOME%libext Also try with following: Properties env = new Properties(); env.setProperty( java.naming.factory.initial , org.jnp.interfaces.NamingContextFactory ); env.setProperty(...

Java: what is Encapsulation in java, can u give one real time example ?, time example, immense power
time example, immense power, true power: If you have been sick, you would have had medicines for sure. One of the tablets that you would have received is a capsule. I hope you would have seen it. Now this kind of tablet, is a bit different from the others. From the outside its just a cap, and...

Java: Front End, jaspreet singh, jakarta apache
jaspreet singh, jakarta apache, java server: Hi Rajesh, I don t know anything about JavaServerFaces but struts... yes, it is a framework and works as Controller in application based on MVC Model2 architecture. At least, struts will not help you to make your html more attractive. Best place...

Java: Enumeration and Iterator, java core packages, java collections framework
java core packages, java collections framework, enumeration interface: Izzzz - java.util.Enumeration and java.util.Iterator are both interfaces. Objects that implement these interfaces usually provide a means to step over the elements of a collection or group of other objects. The Enumeration interface is very old...

Java: About Enumeratoion, hashmap, favorable response
hashmap, favorable response, black magic: An emumeration simply is a list that you can enumerate though, that is get one value at a time from the enumeration. Typically enumerations do not guarentee that you can go back and get elements again. These enumerations are generally created from underlining...

Java: Error Message from a Serialization Project, awt event, java awt
awt event, java awt, midterm question: oh right you also need to switch the arguments you are using... Your constructor has String,float while you have float,String As for the second part... it depends on what the format of Order.dat is. Serlization is a way of saving the data. So you could...

Java: Error in Running Java classes, java examples, java files
java examples, java files, java object: well once you compile check the directory to see if the .java and the .class files are in the same directories. Also yo uhave to make sure that the main method that you breate is compiled in the same folder as the class fill. So if you have Spell.java and...

Java: Exception in Code., java 2d, java code
java 2d, java code, last question: Jules, I tried looking at the code, but had some trouble getting it to work. Your page did not include the class LoadedImage12. Fortunately, I was able to substitute the class javax.swing.ImageIcon. Anyway, the exception I observed was a java.lang.ArrayIndexOutOfBoundsException....

Java: Exception Error please help, image processing in java, applet implements
image processing in java, applet implements, array index: Jules, Thanks for sending your code, it made analyzing the problem easier. Anyway, it took me a while to find the problem, because I was testing your code with a JPG image, but the problem only occurs for GIF and other 8-bit pixel value images. ...

Java: Exception, checks
checks: Checked exception happens at compile time. the compile checks to see if you are doing many thing incorrect ie.... casting a object to a int. and runtime exception is when the program compiles and u are expecting a int and the user enters a string of letters...

Java: Exceptions, instanceof, public string
instanceof, public string, subclasses: public String unimplementedMethod() throws Throwable { Throwable t = new Throwable(); throw t; } public void aMethod() { try { unimplementedMethod(); } catch(Throwable t) { if(t instanceof ThreadDeath) ...

Java: Executing a java program from another directory, rama krishna, java present
rama krishna, java present, java name: Hi, For your first problem, you might try passing the run command as a complete string to the exec method and getting any errors that output e.g. try { Runtime rt = Runtime.getRuntime(); Process prcs = rt.exec(full); // full = java programName...

Java: Executing a java program from another directory, java classpath, rama krishna
java classpath, rama krishna, java present: First, java.exe does not take a directory structure to start, rather it takes the name of the class. You can speficy the classpath if you don t want . as the classpath. E.g. To run your Temp_prog from Current you could use: java -classpath Sub Temp_prog...

Java: Executing a java program from another java program with platform independence, output string, platform independence
output string, platform independence, getinputstream: If you want to wait until the process is finished you can read from the processes stdout and write that to a file. If you want to perform other tasks while this is happening you should do this in another thread. Your code will look something like this....

Java: Executing a java program through another using Runtime.getRuntime.exec(), output string, java tool
output string, java tool, java program: Hi, You need to do something like this: public class Using { public static void main(String args[]) { try { Runtime rt = Runtime.getRuntime(); Process prcs = rt.exec(java Hello); // Get the feedback...

Java: Executing with java vs javaw, java process, jtabbedpane
java process, jtabbedpane, java jar: I can t really say what the issue is. Is might be related to the command window being visible or not. You could narrow this down by executing java without a window (write a test program that uses exec from Runtime to execute another java process try this with...

Java: Exel access through java, java excel, intrinsyc
java excel, intrinsyc, java app: Hi, There are a number of libraries available to read/write to excel. Have a look at: http://sourceforge.net/projects/jexcelapi/ http://www.javaworld.com/javaworld/javaqa/2001-08/02-qa-0824-excel2.html http://j-integra.intrinsyc.com/support/com/doc/java_excel/intro.html...

Java: Exiting Aprogram, deamon, system exit
deamon, system exit, threads: A program can exit normally if all the non-deamon threads end. For example, if you simply have a main methods that doesn t create any threads (and doesn t perform any GUI operations). Then when main ends, the program exits. You could mark all threads aside...

Java: Are the elements of which of the following data structure retrieved in the order of addition?, test length, string test
test length, string test, output c: Hi, Here is an example to show the oerder of addition for the given colelction and dictionary classes. import java.util.*; class CollectionTest { static public void main(String[]p) { new CollectionTest(); } CollectionTest() { String[]...

Java: When I enter (ctrl + D), the jvm will terminate. why?, jvm, java program
jvm, java program, ctrl c: Izzzz - That seems strange to me. On Windows and Unix, Ctrl+C will terminate most programs when running from a console. On Unix, Ctrl+D means end-of-file, so if you type that to a Java program attempting to read input from the console it will probably...

Java: entering a given .class file!!, stack class, basic library
stack class, basic library, import java: Maki, If your teacher wrote the class in the simplest way, you don t have to do anything special in order to use it. Just put the .class file into the same directory with your .class files. Then you can write code using the MyInput class immediately....

Java: entering a given .class file!!, stack stack, stack class
stack stack, stack class, import command: You must make sure that the .class file is in your classpath. E.g. If you run javac on the commandline you would use: javac -classpath . MyClass.java Assuming that the .class file is in the current directory. The import command has nothing to do with...

Java: equality with objects, java textbook, java api
java textbook, java api, string object: Hi, Been busy as I am about to complete a project and I have been busy with its closure and delivery. Three things - 1) In order to compare two custom objects (not defined by the java api, but your own) you need to inherit the Comparable interface and...

Java: error with Java applet, awt event, java awt
awt event, java awt, applet implements: The first error is due to not correctly declaring a method that is called itemStateChanged that takes one parameter a java.awt.event.ItemEvent. Or you are implementing an interface that you did not mean to implement. The second error is due to the fact...

Java: deprecated API, memory footprint, java nio
memory footprint, java nio, incorrect password: As the documentation states the reason that getText() in JPasswordField is depracated is that it leaves a memory footprint of the password in memory. The reason that getPassword does not work depends on how you are using the char[] that it passes back instead...

Java: What is the error(s), public void print, grid arrays
public void print, grid arrays, keyboard error: Hi Gaby, Well this code is actually all correct, and does compile. The reason it doesn t seem to do anything, is because this class contains a bunch of methods that nothing calls. I assume you got this file from the internet or school or somewhere, and...

Java: exception handling, public void paint, byte values
public void paint, byte values, paint method: 1st do not have file operations in your paint method, you do not want to reparse the file every time the screen needs to be redrawn. Second... use a try-catch block. e.g. try { File inputFile = new File( map.gz ); FileInputStream in = new FileInputStream(...

Java: about exception while running the program, noclassdeffounderror, japplet
noclassdeffounderror, japplet, appletviewer: if you want to run an applet that does not have a main function, you must create an html file for it to use. You can use the appletviewer on the html file to see if it works. The other option is to add a main function that servers the same purpose as the applet....

Java: exe, lionel
lionel: There is no .exe file created. .exe is supposed to be windows specific! The equivalenet .class file is created in java! and it is stored in the same directory or in any directory that you redirect to using the -d option while compiling! Thanks and Regards,...

Java: expandable windows & design, java gui programming, fancy icon
java gui programming, fancy icon, unix functions: Sorry been very busy with my project work and deadlines to meet. Ok try this 1. maximize/restore window this.setExtendedState(JFrame.MAXIMIZED_BOTH); and also override the jpanel s getPreferredSize as given below - public Dimension getPreferredSize()...

Java: ; expected. Why??, array
array: You should declare totalarea up front instead of redeclaring it in the for loop. Also (assuming circle is an array) do not add () after length. E.g. double totalarea = 0.0; for(int i = 0; i circle.length;i++) { totalarea += circle[i].carea(); ...

Java: Why extending multiple classes is not supported in java, multiple inheritance, lionel
multiple inheritance, lionel, ambiguity: This is to avoid dangers like ambiguity that is present in C++. Say pkg1, has class A pkg2, has class A if you inherit both at the same time, the compiler gets confused as to what class has to be used... and hence multiple inheritance is avoided....

Java: extract data from access database, yahoo api, yahoo account
yahoo api, yahoo account, good library: Hi, I have never done anything like this, but here is a very good library you can use to get data from an access database. http://jackcess.sourceforge.net/ As for creating the Yahoo account, I would need more data on what you want to do (how to go...

Java: extracting portion of text sing java, word positions, string method
word positions, string method, string text: Hi, Look for the starting and ending word positions using the String method indexOf(). e.g. int start = indexOf( start ); int end = indexOf( stop ); Then get the substring between these points. String text = allText.subString(start, end); ...

Java: extracting records from my database(ms access) and display in gui format java swing...., microsoft access driver, system dsn
microsoft access driver, system dsn, swing program: Hi, Here is some code that may help you: /** * Gets the DSN s from the user and system DSN lists. * p * @return vector containing the DSN s */ private Vector String getDSNs() { if(!SystemToolkit.doesSupportRegistry())...

Java: Faqs, jaspreet singh, google
jaspreet singh, google, java sun: Hi Karun, There are lot of sites, you can search in www.google.com. Anyways, following are few good sites: java.sun.com (best site - you can post your queries in their forum) www.javaranch.com www.javaworld.com (another good site) www.onjava.com...

Java: FIFO, node class, queue class
node class, queue class, zip folder: Queue (java.util.Queue) is an interface that defines simple operations for a Queue. If you want to make your own Queue class you should probably implement this interface. The source code for the java standard libraries is located in the src.zip folder in...

Java: File, convenience class, input bytes
convenience class, input bytes, fileinputstream: Hi, The answer is there in the Java API. File: An abstract representation of file and directory pathnames. i.e. Used for creating, modifying, deleting, etc files and directories. FileInputStream: A FileInputStream obtains input bytes from a file...

Java: File Choosers, file chooser, jfilechooser
file chooser, jfilechooser, static method: Its hard to determine what is happening... 1st are you puting out debug statements to determine if the method used to show the JFileChooser is getting called. 2nd how are you displaying the chooser on the screen? Are you using the static method showOpenFileDialog...

Java: File filters, tempory files, mearly
tempory files, mearly, java documentation: Well its fairly simple: there are two methods that are needed to be implemented: accept(File f) this method is called for every file that the user may see (including directories!). You simply return true if you want to show it or false otherwise. ...

Java: File name of java, java source code, mylist
java source code, mylist, java compiler: Ravi, It is written in every book, when we save Java source code then it should be same as class name under in which main is define.But when we save file with another name it also run. why? If all your code is in one source file, or if...

Java: Files' MetaData extraction, apache tomcat, solidsnake
apache tomcat, solidsnake, frame count: Nope, even if I was just using c++ I wouldn t have a clue on how to expose this information. I know that apache tomcat has some work into it since its default directory listing shows file types and the like. Im pretty sure your just going to have to handle...

Java: Files Metadata Extraction, frame count, image properties
frame count, image properties, microsoft project: Hi, Cool name Snake; You need to stop playing MGS. lol well i am not really clear on the question but you can use the java.util.Properties class but this is only useful for config files and it tends to be of type String. it is usually just a text file....

Java: "Final Year Project Ideas", cataloging books, drawing program
cataloging books, drawing program, creating tools: First java has three main areas of development: J2ME for cellphone applications J2EE for server stuff, databases. J2SE for creating tools and the like. If you are not sure then J2SE is a good choice. Since java is good at making guis, you could create...

Java: Find the greatest sum with moving cursor, empty location, grid location
empty location, grid location, programming question: Lets say you have a MxN grid. Then initilize N states which include the current progress and N new states for next progress. When starting out: oldState[0] = 0. oldState[*] = -1. newState[*] = -1. So initilize all states to -1 except for oldState[0] which...

Java: Flash background colour, java panel, timer class
java panel, timer class, red thread: My guess is that your doing these operations on the Event Thread, usually happens when you respond to a button click. If you are on the event thread, then no updates will occur until you leave the method. Create a new thread (or use the timer class) to do...

Java: Flash Frontend to Java App, client server model, java app
client server model, java app, liking: If you use a client server model you can have Java on the back end while flash is on the front end. Depending on what you are doing this might be a good idea. Closer interactions are possible but significantly more difficulty. Java can do (most) everything...

Java: Forms, jaspreet singh, problem solution
jaspreet singh, problem solution, waste your time: Hi, You can submit the values to your servlet from page A and in servlet either bind those values individually in request or make an DataValue Object class and set the submitted value in DataObject class. And set the DataObject class in request or session....

Java: Frames and their hiding nature, names show, click show
names show, click show, jframe: Hi there, You should use JFrame s setVisible(boolean) method. You don t have to do anything extra to preserve the frame and what s in it - on the contrary, if you want to make sure the frame is destroyed you have to explicitly call it s dispose() method....

Java: FTP, goverment, source code
goverment, source code: The term copyright material is rather undefined. Copyrighted by who? Do you mean registered by US goverment. Maybe the European Goverment. Its not really possible to determine this, no more than to determine if a sentence you find randomly on the internet...

Java: Abstract Classes in Java & Concrete Examples, object oriented programming, generic number
Java: Abstract Classes in Java & Concrete Examples, object oriented programming, generic number, abstract concept

Java: What API is used to sort collection?
Java: What API is used to sort collection?

Java: Assiging java Script variable to jsp variable, variable value
Java: Assiging java Script variable to jsp variable, variable value

Java: how to access winamp controls(buttons like play etc ) through java program, d drive, main string
Java: how to access winamp controls(buttons like play etc ) through java program, d drive, main string, string args

Java: applet keep loading but not run, double quotes, prob
Java: applet keep loading but not run, double quotes, prob, xxxx

Java: applet signed certificate, hi friend, validity
Java: applet signed certificate, hi friend, validity

Java: Is array a data type in Java and C++ ?, java in a nutshell, array types
Java: Is array a data type in Java and C++ ?, java in a nutshell, array types, relevant point

Java: BLUEJ, geeky, oop
Java: BLUEJ, geeky, oop, universities and colleges

Java: build a mail server, kick start, jdbc
Java: build a mail server, kick start, jdbc

Java: Character By Character Input In Java, inputstreamreader, input values
Java: Character By Character Input In Java, inputstreamreader, input values, bufferedreader

Java: Chess Program, minimax algorithm, chess engine
Java: Chess Program, minimax algorithm, chess engine, game tree

Java: get a Class path, string url, getfile
Java: get a Class path, string url, getfile, getclass

Java: Constructor and destructor, garbage collection, java language
Java: Constructor and destructor, garbage collection, java language, memory

Java: Cpu, java cpu, memory utilization
Java: Cpu, java cpu, memory utilization, point accuracy

Java: Create a window in Java with 2 circles ramdomly move in the window, awt event, java awt
Java: Create a window in Java with 2 circles ramdomly move in the window, awt event, java awt, new timer

Java: Creating an English-My Language dictionary in Java, store, dictionnary
Java: Creating an English-My Language dictionary in Java, store, dictionnary, hashmap

Java: How to calculate and show the remaining time left in a JProgressBar, better solution
Java: How to calculate and show the remaining time left in a JProgressBar, better solution

Java: why we can change the value of a String variable when we put the String variable inside ArrayList ?
Java: why we can change the value of a String variable when we put the String variable inside ArrayList ?

Java: class's signature ?, class myclass, signature
Java: class's signature ?, class myclass, signature

Java: closing/ending JFrame applications, attribute
Java: closing/ending JFrame applications, attribute

Java: combobox value in JSP, combo box, form text field
Java: combobox value in JSP, combo box, form text field

Java: How to compare datetime (Urgen), public class test, mmss
Java: How to compare datetime (Urgen), public class test, mmss, import java

Java: concat two strings, string concatenation, memory footprint
Java: concat two strings, string concatenation, memory footprint, java one

Java: convert an audio file from 8 bit into 16 bit, logic
Java: convert an audio file from 8 bit into 16 bit, logic

Java: core java oops concept, common interface, time example
Java: core java oops concept, common interface, time example, package java

Java: creation of object in interface, area of rectangle, rectangle class
Java: creation of object in interface, area of rectangle, rectangle class, class rectangle

Java: cursor, point 0, string name
Java: cursor, point 0, string name, cursor

Java: Data Extraction and analysis(HTML parsing), relevant data, weather forecast
Java: Data Extraction and analysis(HTML parsing), relevant data, weather forecast, crawler

Java: Date Conversion, d2, dd
Java: Date Conversion, d2, dd, yyyy

Java: How the Driver Manager come to know that Driver is Loaded., sekhar, mast
Java: How the Driver Manager come to know that Driver is Loaded., sekhar, mast

Java: What is the difference between ActionListener and MouseListener?, ui changes, java code
Java: What is the difference between ActionListener and MouseListener?, ui changes, java code, buss

Java: What is the difference between creating object by using new and newInstance ?, string classname, c class
Java: What is the difference between creating object by using new and newInstance ?, string classname, c class, class c

Java: difference between .eqauls() method and == operator, string object, true system
Java: difference between .eqauls() method and == operator, string object, true system, object references

Java: What is the difference between implicit conversion and casting?, floating point
Java: What is the difference between implicit conversion and casting?, floating point

Java: Is digital dice possible ?, type o
Java: Is digital dice possible ?, type o

Java: displaying the content of HTML File, java application, bugs
Java: displaying the content of HTML File, java application, bugs

Java: dynamic array/ array list of arraylists
Java: dynamic array/ array list of arraylists

Java: dynamic array initialization, string args, main string
Java: dynamic array initialization, string args, main string, println

Java: what is Encapsulation in java, can u give one real time example ?, confusion
Java: what is Encapsulation in java, can u give one real time example ?, confusion

Java: error in JDBC driver, open mode, access database
Java: error in JDBC driver, open mode, access database, possibilities

Java: Why extending multiple classes is not supported in java, class myclass, void abc
Java: Why extending multiple classes is not supported in java, class myclass, void abc, multiple inheritance

Java: extracting records from my database(ms access) and display in gui format java swing...., vector data, java awt
Java: extracting records from my database(ms access) and display in gui format java swing...., vector data, java awt, javax swing

Java: File name of java, compilation unit, class definitions
Java: File name of java, compilation unit, class definitions, java source

Java: "Final Year Project Ideas"
Java: "Final Year Project Ideas"

Java: Flash background colour, public void paint, awt event
Java: Flash background colour, public void paint, awt event, java awt

Java: filesize
Java: filesize

Java: GUI Program Assistance, prgramming, java programming
Java: GUI Program Assistance, prgramming, java programming, lower case

Java: how to generate serialVersionUID ?, new java, java util
Java: how to generate serialVersionUID ?, new java, java util, date time

Java: generating XML using JSP/Servlet, dynamic xml, thanks in advance
Java: generating XML using JSP/Servlet, dynamic xml, thanks in advance, jsp

Java: How to be a good java programmer?, professional programmer, learning platform
Java: How to be a good java programmer?, professional programmer, learning platform, logics

Java: How to be a good programmer?, expert programmers, programmer
Java: How to be a good programmer?, expert programmers, programmer

Java: Host Access Class Library X Host Access Beans, vb6 code, host on demand
Java: Host Access Class Library X Host Access Beans, vb6 code, host on demand, mainframe

Java: How to hack into runescape?, word one, runescape
Java: How to hack into runescape?, word one, runescape, sans serif font

Java: get hardware static and dynamic info, using java, harddisk
Java: get hardware static and dynamic info, using java, harddisk, informaton

Java: Inner classes, stack frame, instance variable
Java: Inner classes, stack frame, instance variable, local variable

Java: Installing Java on HP/Compaq Windows Vista Home Premium, hp vista, new hp
Java: Installing Java on HP/Compaq Windows Vista Home Premium, hp vista, new hp, sun java

Java: Is Integer passed by reference ?, public static void, cheers
Java: Is Integer passed by reference ?, public static void, cheers

Java: Interface with other apps, java program, robot
Java: Interface with other apps, java program, robot, program window

Java: Where is Iterator Interface Implemented?
Java: Where is Iterator Interface Implemented?

Java: Where is the Iterator interface implementation?, array, implementation
Java: Where is the Iterator interface implementation?, array, implementation

Java: Java
Java: Java

Java: Is the Java bytecode the same as the binary code?, java virtual machine, bytecode
Java: Is the Java bytecode the same as the binary code?, java virtual machine, bytecode, java compiler

Java: Java Excel
Java: Java Excel

Java: Java New Window, dumbass, ug
Java: Java New Window, dumbass, ug

Java: Java Palindrome Program, string word, word length
Java: Java Palindrome Program, string word, word length, punctuation marks

Java: Java password program, study java, passwordchecker
Java: Java password program, study java, passwordchecker, class pattern

Java: Java: polymorphism, time duration, object creation
Java: Java: polymorphism, time duration, object creation, run time

Java: Java Question - How to
Java: Java Question - How to

Java: Java and Sound Editing, human voice, practise
Java: Java and Sound Editing, human voice, practise, e mail

Java: Java Virtual Machine Launcher
Java: Java Virtual Machine Launcher

Java: JFrame and options, jdesktoppane, jframe
Java: JFrame and options, jdesktoppane, jframe, true method

Java: JTextPane and mouse disabling, mouselistener, mouseevent
Java: JTextPane and mouse disabling, mouselistener, mouseevent

Java: java, virtual functions, virtual function
Java: java, virtual functions, virtual function, subtle issues

Java: java - MULTIPLE INHERITANCE, conflict problems, void foo
Java: java - MULTIPLE INHERITANCE, conflict problems, void foo, class x

Java: is java pure object oriented language, object oriented language
Java: is java pure object oriented language, object oriented language

Java: java random character, sum sum, main string
Java: java random character, sum sum, main string, import java

Java: java reverse prog, f system, d system
Java: java reverse prog, f system, d system, main string

Java: java web crawler, java awt, import java
Java: java web crawler, java awt, import java

Java: jsf internationalization in arabic, ascii character, equvalent
Java: jsf internationalization in arabic, ascii character, equvalent

Java: jsp,servlets, java code, jsp
Java: jsp,servlets, java code, jsp, programmer

Java: Keypresses and Key events, true case, switch case
Java: Keypresses and Key events, true case, switch case, public void

Java: Linked Binary Tree, constant time, balancing act
Java: Linked Binary Tree, constant time, balancing act, node

Java: Linked List, java util, lionel
Java: Linked List, java util, lionel

Java: local variable vs. instance variable and instance variable vs. static variable, instance variables, static variables
Java: local variable vs. instance variable and instance variable vs. static variable, instance variables, static variables, heap

Java: Mastering Java for Beginner, foremost priority, java course
Java: Mastering Java for Beginner, foremost priority, java course, nice price

Java: Math.random() method, math
Java: Math.random() method, math

Java: makin dictionary in java, class dictionary, false success
Java: makin dictionary in java, class dictionary, false success, class exception

Java: Is the method overloading polymorphism ?
Java: Is the method overloading polymorphism ?

Java: about null in HashMap and Hashtable, hash table, hashmap
Java: about null in HashMap and Hashtable, hash table, hashmap, compilation

Java: where does the output of Runtime.getRuntime().exec("ls -l") go?, string commands, result count
Java: where does the output of Runtime.getRuntime().exec("ls -l") go?, string commands, result count, inputstreamreader

Java: Passing by Value, searching the web
Java: Passing by Value, searching the web

Java: Polymorphism definition, oriented programming language, shape polymorphism
Java: Polymorphism definition, oriented programming language, shape polymorphism, inheritence

Java: Prime numbers, prime system, currenttimemillis
Java: Prime numbers, prime system, currenttimemillis, int num

Java: Prime numbers, c check, println
Java: Prime numbers, c check, println, system exit

Java: How to Print a Simple Text File in Java?, awt toolkit, java awt
Java: How to Print a Simple Text File in Java?, awt toolkit, java awt, awt event

Java: Problem in Core Java Program, stuf, thr
Java: Problem in Core Java Program, stuf, thr

Java: Problem making a java program that involves Monotone sequences
Java: Problem making a java program that involves Monotone sequences

Java: if (pageContext != null) pageContext.handlePageException(t); error, datasource name, jsp
Java: if (pageContext != null) pageContext.handlePageException(t); error, datasource name, jsp

Java: portable java, java exe, bin folder
Java: portable java, java exe, bin folder, jre

Java: print a text file in java, test quiz
Java: print a text file in java, test quiz

Java: getting processor id, lan card, mac address
Java: getting processor id, lan card, mac address, address changes

Java: Reverse number, readline, remainder
Java: Reverse number, readline, remainder, string args

Java: Does RMI use any port by itself, not RMI registry ?, server port number
Java: Does RMI use any port by itself, not RMI registry ?, server port number

Java: RSA java !, java math, gcd
Java: RSA java !, java math, gcd

Java: Run/Execute Code in a String Variable
Java: Run/Execute Code in a String Variable

Java: refreshing browser
Java: refreshing browser

Java: runescape account hacking/cheats, password list, moniter
Java: runescape account hacking/cheats, password list, moniter, whole time

Java: runescape bot creation, runescape
Java: runescape bot creation, runescape

Java: SCJP
Java: SCJP

Java: Simple java applet problem, gcc website, java helloworld
Java: Simple java applet problem, gcc website, java helloworld, gcj

Java: Sort 2 attributes with collection sort, attributes, logic
Java: Sort 2 attributes with collection sort, attributes, logic, apache

Java: Static method override, static methods, misconception
Java: Static method override, static methods, misconception, choices

Java: Sub programs in Java, dummies book, blank space
Java: Sub programs in Java, dummies book, blank space, strut

Java: System Date
Java: System Date

Java: socket programming : chat program, swing application, socket programming
Java: socket programming : chat program, swing application, socket programming, sockets

Java: Is there a standard way to implement out parameter in Java?, andrew tomazos, quotient
Java: Is there a standard way to implement out parameter in Java?, andrew tomazos, quotient, public void

Java: Is the statement "Iterator also known as Cursor" correct?, typical methods, data structure
Java: Is the statement "Iterator also known as Cursor" correct?, typical methods, data structure, trough

Java: Trying to write to text file but it just ends up erased., filewriter, bufferedwriter
Java: Trying to write to text file but it just ends up erased., filewriter, bufferedwriter, array length

Java: Can't we declare variable insdie while like for loop?, correct syntax, string line
Java: Can't we declare variable insdie while like for loop?, correct syntax, string line, expression

Java: tomcat, java jdk1, c program
Java: tomcat, java jdk1, c program, lionel

Java: Unloading and Loading another window?, myapplication, args
Java: Unloading and Loading another window?, myapplication, args

Java: Urdu Language Display in Swing, external failure costs, management appraisal
Java: Urdu Language Display in Swing, external failure costs, management appraisal, conformance

Java: I wan to learn java, professional java developer, demo class
Java: I wan to learn java, professional java developer, demo class, java course

Java: i want help to search a file from different folders, null pointer exception, getname
Java: i want help to search a file from different folders, null pointer exception, getname, string name

Java: I want to know whether or not System.exit(0) and finally can be used together?, finnaly, system exit
Java: I want to know whether or not System.exit(0) and finally can be used together?, finnaly, system exit, main string

Java: I was wondering that "super" in Java refers to the immediate parent or parent's parent ?, public void, main string
Java: I was wondering that "super" in Java refers to the immediate parent or parent's parent ?, public void, main string

Java: How to zip directories in java ?, write buffer, infinite loop
Java: How to zip directories in java ?, write buffer, infinite loop, len

Java: file matching, null pointer exception, int length
null pointer exception, int length, null value: NullPointerException is a very common error that arrises when you try and call a method (or access a field) on an object that is null. This could either be because you tried to use an unitilized field, called a method that returned a null value, or you set...

Java: file streams, computer science engineering, character streams
computer science engineering, character streams, nextline: If you want to use some other terminator e.g. user types in END you could add a check before writing it and break out of the loop then. Control-Z would still end it, since control-z represents end of file, and input after control-z is entered is not well...

Java: files, java component, svg file
java component, svg file, prints: I am not familiar with S.o.p Usually when a user wants to print to a file they select print and then select a printer that prints to a file. You can draw a java component to an image and then save that to a file, or you can use Batik to save it to an...

Java: filesize, java class libraries, java extensions
java class libraries, java extensions, java extension: Joe, I don t know anything about writing Coldfusion Java extensions, although I know it should be possible. I can tell you how to get the size of a file in bytes. Take a look at the length() method of the java.io.File class. You could use it this...

Java: filestream, string args, access file
string args, access file, main string: import java.io.*; public class AppendByte { public static void Main(String[] args) throws IOException { for(int i = 0; i args.length;i++) { RandomAccessFile file = new RandomAccessFile(args[i], rw ); long fileLength...

Java: filestream, j2se documentation, api methods
j2se documentation, api methods, access file: I would suggest you to visit java.sun.com and look at the j2se documentation (http://java.sun.com/j2se/1.4.2/docs/api/index.html) for all such queries. In case you still have difficulties in using the api methods, please let me know. regards, Lione...

Java: filestream, filewriter, access file
filewriter, access file, newline: Hi, here is the snipplet of writing data BufferedWriter out = new BufferedWriter(new FileWriter( test.txt )); out.write( test ); out.newLine(); out.write( blah ); out.close(); // the close is very important if it left out then you will not see the...

Java: filtering, public static string, import java
public static string, import java, ioexception: Hi, You should dispose of the PreparedStatement, ResultSet and if necessary the Connection by setting them to null. The garbage collector will then be able to clean up these resources. Use Connection.close() to close the database. Use Socket.close()...

Java: final year project, online ticketing system, gov agency
online ticketing system, gov agency, final year project: Hi, You could try making an online ticketing system for an gov agency like the railways or travels or an airline or stock market status for a share or a news update of interested topics that a user is subscribed to. Hope these ideas help. Thanks and Regards,...

Java: final year project, java j2me, memory constraints
java j2me, memory constraints, final year project: Hardik, J2ME (JavaME) is a platform for developing apps for small, mobile, and wireless devices. There are several different versions or editions available. The one you probably want is the Toolkit for CLDC , but if you are thinking about bigger...

Java: How to find a number a float o not, university computer science, faculty of engineering alexandria university
university computer science, faculty of engineering alexandria university, egypt alexandria: If you want to know if a number can be represented exactly as an integer you could: double myDouble = ...; if((int)myDouble == myDouble) { //It can be represented as an int } else { //It cannot be represented as an int } Searching for a...

Java: floating-point, max value, mantissa
max value, mantissa, mail: Hi, Been busy with the project closure. Its delivery time. Sorry. Missed your mail. I feel that option 1 is not possible as it would exceed the max value of Float.MAX_VALUE A value such Float.MAX_VALUE * 2 would only result in Infinity. Thanks and Regards,...

Java: Why cannot the following code be compiled?, public class test, main string
public class test, main string, string args: Izzzz, The problem with this code is that it is ambiguous. The compiler does not know which overloaded println method to call: println(String) or println(char []). To fix the code, you could do this: public class Test { public static...

Java: Why does the following code print nothing?, public class test, string s1
public class test, string s1, value int: well it should print out true , but not Equal . This is because Strings can only be equal to Strings. Generally speaking the equals operator will always return false if the two objects being compared are not of the same class. The implementaion of equals...

Java: what does the following sentence mean?, factory approach, static factory method
factory approach, static factory method, flexible java: Izzzz, By using static factory methods, an API can return objects without making their classes public. Yes, this is a true statement. It is talking about a fairly common technique in creating flexible Java APIs. The idea is that you define...

Java: I found I can create an object with the name same as its class, should we usually do likt that?, member variables, class names
member variables, class names, lowercase letter: Izzzz - Yes, this is permitted, because local variables and member variables are in a different namespace than class names. However, you should NOT do this. In Java, you are always supposed to follow the convention that class names begin with a...

Java: I found that we can not write constructor, super and this in an interface, is it because interface can not initialized?, java language specification, public interface
java language specification, public interface, instance method: Izzzz - we can not write constructor, super and this in an interface, is it that because interface can not initialized? An interface cannot have any instance method defined, nor can it have any constructors defined. Since this makes...

Java: About Garbage Collection, garbage collector, garbage collection
garbage collector, garbage collection, instance variable: Hi, The question is very generic. Now let me make assumptions to answer your question. 1. The variable is an instance variable. a. Used within methods in the class. - Destroyed only when the class is not used any further. b. Never used...

Java: Garbage collection in applet, serial execution, jvm command
serial execution, jvm command, garbage collection: Hi Ravi, Parallel garabage collection is useful only if you are running on a multi-processor machine. In the case that you mentioned (lot of local variables), parallel GC will be useful (on multi-processor machine), as it will reduce the serial execution...

Java: Gegorian Calendar in Java, leap year, january to december
leap year, january to december, java util: Talia, I want to write a code in java that constructs a gregorian calendar Java already has such a class, java.util.GregorianCalendar. You can see the documentation for it here: http://java.sun.com/j2se/1.4.2/docs/api/java/util/GregorianCalendar.html...

Java: Generating unique numbers in java, serial keys, those keys
serial keys, those keys, web interface: Hi, This could be handled in a step of 3. 1. Create a random number thats 8 digit and convert it to hexa. 2. store it in a file 3. when you load the program again, generate a number again and check if this number exists earlier, elase create a new one...

Java: Generics in Java 1.5, generic info, type java
generic info, type java, bytecode: Well the code itself would not case the problem. It is possible that when the jar is created some of the generic info was removed by an optimizer. Also make sure that IPCBaseObject is not generic. The workaround for this would be to compile with ApplicationHelper.java...

Java: Generics and Type Erasure problem., member variables, output queue
member variables, output queue, type java: Shawn, You are essentially correct that the type erasure is what s generating your warning. There is no way to get eliminate the warning without changing your code or your build process. There are several approaches to changing your code that...

Java: Generics and Type Erasure problem., type java, bytecode
type java, bytecode, jar file: Hi, I have faced the same problem in JDK 5 with generics. Unfortunately, I had to play around a little until I found the answer to my problem. You could try using generics in a few places, but I m not sure how this would affect you code, e.g. public...

Java: GUI Pauses, graphical card game, computer opponents
graphical card game, computer opponents, timer class: You do want to create another thread for this. But you may need to repaint after the thread is finished sleeping since you are not on the event thread anymore. You can also use the Timer class to schedule events. Look at the Timer tutorial for more information:...

Java: GUI Program Assistance, awt event, java awt
awt event, java awt, string s2: Sorry, I was out of station and just came back. So, am sorry that I could not reply to you earlier. Try this import javax.swing.*; import java.awt.*; import java.awt.event.*; public class JFrameTester implements ActionListener { private JTextField...

Java: GUI Program Assistance, string s2, uppercase lettering
string s2, uppercase lettering, harvey answer: You cannot compile on the commandline like that. You first create a file Uppercase.java and save the code in it. You then compile it using javac: javac Uppercase.java This will generate a .class file in the current directory. After the code compiles...

Java: (GUI) question about action listeners, awt event, java awt
awt event, java awt, jlabel: Hi, To write action listeners for a checkbox, try the following: 1. Add an item listener to the checkbox yourJCheckBox.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(ItemEvent e) { yourJCheckBox_itemStateChanged(e);...

Java: GUI wrappers, unix functions, mac os x
unix functions, mac os x, unix terminal: I m not sure what you mean by wrappers for unix functions . Do you mean creating buttons that have the same effect as using various unix terminal commands, or perhaps you mean calling some of the unix kernal functions. Being able to run your application on...

Java: garbage collection, garbage collection, gaurantee
garbage collection, gaurantee, lionel: Hi, Sorry, I could not answer your question as I out of the country for a while. There is no gaurantee that the finalize code is always executed. One may invoke it, by giving the compiler an instruction by setting the object to null and also by calling...

Java: garbage collector, garbage collector, garbage collection
garbage collector, garbage collection, boooks: When control has returned from gc as much garbage has been collected as possible. Although you are not demanding that gc be run, it is also not a request either since the garbage collection will have been completed when control returns to you. See: http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Runtime.html#gc(...

Java: how to generate serialVersionUID ?, serializable class, java doc
serializable class, java doc, incompatible versions: Izzzz - You don t have to generate any fancy number. You can just set any number. The only time you would set a serialVersionUID yourself is when you wanted to prevent the automatic generation of a hashed one. private static final long serialVersionUID...

Java: generating XML using JSP/Servlet, jaspreet singh, program extracts
jaspreet singh, program extracts, dynamic xml: Hi Sri, I have never tried this kind of stuff myself but anyways found some links on the net, which might be of some help. http://java.sun.com/developer/technicalArticles/xml/WebAppDev2/ http://www-106.ibm.com/developerworks/java/library/j-dynxml.html...

Java: getch() in JAVA, key listener, getch
key listener, getch, ineed: For console input java doesn t have any equivalent to getch. If you really need that function you will have to write one in C and call it from java. If you want to use text fields you can use a key listener. See http://java.sun.com/docs/books/tutorial/post1.0/ui/keylistener.html...

Java: getch() in java, java guis, swing tutorial
java guis, swing tutorial, swing gui: TN - I don t understand your question. There is no portable way to read a single character from the console in Java. You always have to wait for the user to finish entering a line of input. (Actually, there is no portable way to do that in C either....

Java: getch() in java, java bug, getch
java bug, getch, ineed: Hi, There isn t a way. You can t count on every platform to support such. Some just have line mode console input. You can simulate this functionality with a TextField to enter your data into character by character. You could also try JNI. Here is...

Java: good book for learning java?, learning java, sun site
learning java, sun site, using java: I would suggest you to read the tutorial on the sun site that is available as a free download. Other than that you may try one of the Head First series of books or Using Java or Java 2 Unleashed. They can be helpful. Thanks and Regards, Lione...

Java: How to be a good java programmer?, learning java programming, java 2 micro edition
learning java programming, java 2 micro edition, joshua bloch: Apurva, I desperately want be a java programmer. ... Can you give me some tips how to do it? Well, the best way to improve as a Java programmer is to read good Java books, and to practice your programming. A very good book is Effective Java...

Java: How to be a good programmer?, open source projects, worthwhile projects
open source projects, worthwhile projects, writing programs: Chris, If you really want to be programmer, it just takes dedication and practice. If you don t have a job where you do programming, then a good way to get practice is to participate on open source projects. There are tons of projects looking for programmers,...

Java: graphics, audioclip interface, two circles
audioclip interface, two circles, venn diagrams: Hi Mike, Use the drawOval(int x, int y, int width, int height) method in the Graphics class to draw your circles. Then, as you remember (from maths class) with Venn diagrams and boolean logic, find out when they overlap. Then all you have to do is...

Java: group by in java, public interface, s sales
public interface, s sales, public string: Not really, but its not to hard to do in a few lines of code. Although this depends on the data type you are using. E.g. public interface Sale { public String getCustomer(); public int getAmount(); ... } ... Collection Sale sales = ...;...

Java: gui design, border layout, gui component
border layout, gui component, field button: You can set the maximum size of the components using the setMaximumSize method, but I am not sure this will be what you want. I see no problem in using other layout managers, I m not sure what you mean by being syncronized with Gridlayout, all layoutmanager...

Java: gui/swing, computer science student, java programming language
computer science student, java programming language, object oriented model: The Swing library is a gui library that is written entirly in java using an object oriented model. The Swing library includes many gui components not avialable in AWT. I have not been one to rely on books, I would suggest first looking at the tutorials...

Java: gui vs logger question, application accesses, java awt
application accesses, java awt, java programmer: Hi, What you could do is include the code to write to the logger in the method that writes to the GUI. Pass a true or false parameter to the method, and based on that, log either to the GUI or to the logger. private void myMethod(/*Other parameters,*/...

Java: gui, relative locations, jlabel
relative locations, jlabel, application window: Well a basic container will do. For awt just subclass Container, for swing subclass JComponent, or just use a JPanel. These are blank containers, so it depends on how you want them layed out that is the problem. You can use a layoutmanager to put these things...

Java: Hacking, reverse enginerring, exact game
reverse enginerring, exact game, wont answer: The first thing you have to relise is the only hacking that really can be done is client hacking. Even if you did manager to hack the server you would get in big trouble really fast. This generally limits you to botting, but if your lucky you can find some...

Java: Happy New Year!, public static string, public static void
public static string, public static void, member variables: Izzzz, I can explain these two things. 1/if a class has static variable, can the class be garbage collected once if it is instanced ? Instances of the class can be garbage collected, and that will not affect the static member variables...

Java: Hash Tables, int hash, longitude and latitude
int hash, longitude and latitude, hash tables: You can store the value as a Vector (or ArrayList). Just pull out the Vector and add a value. As for the keys, so long as two keys are equal() and have the same hashcode, you don t need the origional key to get the value. E.g. private Hashtable locations...

Java: Hello,I'd be very thankful..., microsoft office xp, smart voice
microsoft office xp, smart voice, google: well microsoft office xp and office 2003 has a very smart voice recognitions software bundled with Word. you shoud check it out. Also if you have time do a search on google for speech to text with the quotes still on. You should find some good ones ...

Java: Hello sir How are..., dissasembler, javap
dissasembler, javap, java files: i am not sure what javah does but i will look into it further. javap is a dissasembler that takes class files and turn them into java files so you can read it. the htmlconverter converts html containing applets into a readable format. plugins are programs...

Java: Help, multiple inheritance, clever solution
multiple inheritance, clever solution, println: 1. There are various ways of doing this... here is a clever solution. You could also use a second for loop inside the first one to do the second half: for(int i = 0; i 4; i++) { for(int j = -i; j = i; j++) System.out.print(i - Math.abs(j)...

Java: Help with depth info on Eclipse, software project development, implementation tools
software project development, implementation tools, www tutorial: Hi, I dont know how I can help you with this. There are wonderful user guides available dude, perhaps you should use them Eclipse guide http://www.eclipse.org/documentation/main.html Ant http://www.roseindia.net/jboss/10_minutes_guide_to_ant.shtml...

Java: Help with Java, jaspreet singh, header footer
jaspreet singh, header footer, memory buffer: Hi Jason, you don t need to do all this.. .you can just use the following: Toolkit tKit = Toolkit.getDefaultToolkit(); image = tKit.createImage(bytesIn); in code above.. bytesIn is the image data received from the socket.... Enjoy!... let...

Java: Help with Java, header footer, memory buffer
header footer, memory buffer, cleint: If you know the size of the image you are about to get use it as below of If not your ll have to read the header of the image, extract the size info from that, then read it. int imageSize = XYZ; // In bytes. byte imageData[imageSize]; in.read(imageData);...

Java: Help with Java, java awt, image toolkit
java awt, image toolkit, png image: Well its not very hard: import java.net.*; import java.awt.*; import javax.swing.*; ... final String host = ... ; final int port = ...; Socket socket; try { socket = new Socket(host,port); } catch(UnknownHostException e) { e.printStackTrace();...

Java: Help with these methods, random integers, colomns
random integers, colomns, decrement: Bajanisi, can you show me how to create a method that finds the sum of rows and places it in an array, with position 0 in that array containing the sum of the integer values in row 0 and so on. Yes, this is pretty easy. public int[]...

Java: Help with programming in java, colombia south america, array value
colombia south america, array value, array values: Keep 4 arrays and populate the values as given in the matrix. answers inline to your question (a) Print the previous table with everything included. print all array values (b) Calculate and print the total number of votes received by each candidate...

Java: Help on Static Inner Class, class subclass, instance fields
class subclass, instance fields, static members: static classes have to inner classes. Differences between static classes and non-static classes: static classes are just like regular outer classes except that you reference them by OuterClass.InnerClass, and inner classes have access to private data...

Java: Help!!, class canvas, default constructor
class canvas, default constructor, instance variables: Hi, 1. A constructor is where you would call important code that needs to be set up before using the class. It can also be used to initialize variables, create an HTTP connection for example. Yes, you can exclude a constructor. If you do so, the Java...

Java: Hi Artemus,How can I remove..., artemus, jframe
artemus, jframe, boarder: The closest answer I have is to use setUndecorated(true) on the frame. Unfortunally this also removes everything, including the title bar, and boarder. You can then make your own RootPaneUI for the rootpane or the frame, drawing it however you want. Its a...

Java: Hi Lionel, inetaddress class, microsoft link
inetaddress class, microsoft link, swing application: Yes it is possible. For that you must make your program as a windows service. Links to refer: http://support.microsoft.com/kb/137890 http://www.iopus.com/guides/srvany.htm So ideally your program would be a swing application and you would execute the...

Java: Hi, Mr.Harper,Thanks for..., executable jar file, java vm
executable jar file, java vm, application deployment: 1. Its not common to require a lot of memory to run the VM. I think the default size is 90M 2. If the user does not have enough ram, then the VM will not start up, and (I think) you will get a non-zero return code. In this case you will simply have to try...

Java: Hi Mr. Harper,I want to..., numerator and denominator, simple fraction
numerator and denominator, simple fraction, operator buttons: To determine if a fraction is in lowest form, just determine if the gcd if the numerator and denomerator is 1. to find the gcd of a,b: repeat until a is 0 if b is larger then a, swap a and b let a = a mod b. repeat b is the gcd of (the origional) a and...

Java: Hi there,I'm a beginner..., java helloworldapp, operable program
java helloworldapp, operable program, java exe: hi, Please look for java.exe in the folder as given below - java_install_directory_in_your_machine in Once you know this directory, I want you to do add this to the path. Refer setting the path in the same tutorial. Once you do that you can execute...

Java: Hi, english albanian dictionary, partition tables
english albanian dictionary, partition tables, language translation: Lets break this into smaller units - 1. Data Store - you may need to keep the whole data in the database with the appropriate encoding for Albanian. you may also need to add an index on the English words so that you can search them easily. Again if...

Java: Highlighting a line in JTextArea, jtextpane, rich content
jtextpane, rich content, alan moore: see this article and the code written by alan moore and bjorn at http://www.velocityreviews.com/forums/t147950-how-can-i-highlight-the-current-row-in-a-jtextarea.html I personally prefer the one that bjorn has written as it uses a JTextPane that can be...

Java: Home page is customized screen, borderless window, example script
borderless window, example script, page id: try this piece of code script type= text/javascript function popUp(URL) { day = new Date(); id = day.getTime(); eval( page + id + = window.open(URL, + id + , toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=320,height=240,left...

Java: Host Access Class Library X Host Access Beans, java methods, host access
java methods, host access, java library: I haven t used this library myself. If the method is missing from the java library (trying looking in the index of the javadoc for the method, it might be in another class). An automated tool was probably used to wrap the c++ functions to java methods. If...

Java: Host Access Class Library X Host Access Beans, awt classes, tcp ip connection
awt classes, tcp ip connection, java awt: Zbynek, I don t think you ll find any Java package that will let you control the session already opened by the IBM Personal Communications terminal window. The VB6 objects you are using were probably specifically coded to work with the Terminal...

Java: How to hack into runescape?, runescape bots, definations
runescape bots, definations, direct access: I don t think anyone has actually hacked into runescape. Bots have been created, exploits have been found. Any exploit that has been discovered beyond a month ago has been patched and can no longer be used. Bots are only midely reliable. You are getting...

Java: haiI am new to java.Will..., java beginners, java programmers
java beginners, java programmers, beginner html: Faizal, There are many good sites for Java beginners. Start with the official Java tutorial: http://java.sun.com/tutorial/ You could also check out the resources here: http://java.sun.com/learning/new2java/ A site for new Java programmers...

Java: haiI am new to java.Will..., jaspreet singh, java sun
jaspreet singh, java sun, codings: Hi Faizal, Best place to learn is java.sun.com... they have some nice tutorials... which you can download... there are lot of sites available like javaworld.com javaranch.com but start with java.sun.com All the Best... let me know if have any doubt...

Java: hai, j orlin grabbe, sha1 hash algorithm
j orlin grabbe, sha1 hash algorithm, chinese remainder theorem: Hi, Here is an example of RSA encryption. ------------------------------------- LAYNETWORKS.COM posted with permission Java Program for RSA Encryption by J. Orlin Grabbe (1998-2001 J. Orlin Grabbe) --------------------------------------------------------------------------------...

Java: get hardware static and dynamic info, java programming language, real time system
java programming language, real time system, disk free space: Paria, There is no portable way for a Java program to obtain real-time system information. Some forms of static system info can be obtained by looking at System properties, and there are many different platform-dependent ways to obtain system information....

Java: hashCode method, hashset, string 1
hashset, string 1, hashtable: 1. Hashcode is used in various places, more spefically in classes that rely on hashing objects such as Hashtable and HashSet. 2. Impossible. The hashcode for two different objects can be the same, but the hashcode for two objects which are equal are guanenteed...

Java: hashcode() !!!!!!!!!, public int size, arraylist
public int size, arraylist, instanceof: Robert, The hashCode() method merely needs to return an int, such that the int always has the same value for the same object, and very likely has different values for different objects. If you implement hashCode(), you should also implement equals(),...

Java: hashcode() !!!!!!!!!, public int size, currenttimemillis
public int size, currenttimemillis, best bet: A hashcode is a unique number. In order to generate a unique number, the best bet would be to use System.currentTimemillis() that generates a unique number. Any calculation using mathematic operations can be used as a has code. Hope this helps. Thanks...

Java: hashcode() !!!!!!!!!, public int size, arraylist
public int size, arraylist, instanceof: Just borrow the hashcodes from addrBookName and emaList. E.g. public int hashcode() { return addrBookName.hashcode()^emeList.hashcode(); } (^ is xor) If you think it is unlikely that two address books have the same name you can simply use the addrBookName...

Java: hello sir how are you..., java api, section java
java api, section java, edition documentation: Hi, Please visit http://java.sun.com/ There you will see a link for documentation. Click j2se platform. Look at the section Java 2 SDK, Standard Edition, Documentation. View the english form of the docs there. If you hava no idea of the package structure,...

Java: hello sir how are you..., java api documentation, datagramsocket
java api documentation, datagramsocket, overview summary: Gaurav, The Java API documentation is available here: http://java.sun.com/j2se/1.4.2/docs/api/ The full Java API is composed of packages. Each package contains classes and interfaces that serve a related purpose. The overview page, http://java.sun.com/j2se/1.4.2/docs/api/overview-summary.html...

Java: hello sir I am doing software..., enterprise java beans, java server pages
enterprise java beans, java server pages, core jsp: Hi, - java beans - Consider getting the original material given by sun for its courses. Try borrowing them. They are good. Else download the tutorial from the sun site... thats nice too. - Enterprise java beans - mastering ejb by Ed Roman - java...

Java: hello sir how are you..., java api, java lang object
java api, java lang object, hierachy: Well the hierachy of classes are hard. Because its alot. the highest class is object and all types are objects except basic types like int double. anything that starts with a capital letter is a object like String. these types have methods and they can be...

Java: hello, protocall, avialable
protocall, avialable, firewire port: Its not really the language, rather its whatever API you find that will handle the video. If you find one for java you can use that, if you find one for c++ then you can use c++. If you cannot find a library and you know the protocall for the video firewire,...

Java: help!!, class canvas, instance variables
class canvas, instance variables, pseudo code: Dahlia, 1.What is a constructor and why is it important? Is it possible to write a java code without a constructor? If so, how would one go about it? Give an example. A constructor is a special kind of method that initializes an object...

Java: help, java strings, arabic letter
java strings, arabic letter, arabic characters: It is possible (but not simple) to call VB functions from Java (or the other way). To do this you would need to write a c++ dll that inter operates with java using JNI. And that could then interop with VB. If instead you are using VB.NET, you can use IKVM...

Java: help with java, header footer, memory buffer
header footer, memory buffer, cleint: Jason, There is no way to read an image from (or write an image to) a socket. You must use the methods for reading (and writing) images with streams. After you have created a socket, you can get a stream for reading from it, or writing to it. You...

Java: help please with handler(chain of responsibility), public abstract void, chain of responsibility
public abstract void, chain of responsibility, abstract object: a sample compiled code attached public abstract class AbstractStorage implements Storage { protected String criteria = null; protected String identifier ; public AbstractStorage(String identifier) { this.identifier = identifier ; } ...

Java: help please with handler(chain of responsibility), public abstract void, chain of responsibility
public abstract void, chain of responsibility, abstract object: Well I see two problems with this code: 1. you are calling super.CheckCriteria, but this class only extends object, so there is no super to call method to call. 2. if this line was in the BinStorage class then it would be checkCriteria not CheckCriteria...

Java: help please problem with Singleton, proxy pattern, proxy object
proxy pattern, proxy object, singleton: scenario 1: create a private instance of the proxy object that connects to the db. Create its public getter and setter methods too. Adv: problem solved disadv: one can directly create an object of the proxy to create multiple connections scenario...

Java: help, mediatracker, string filename
mediatracker, string filename, gif jpeg: Well if you have the gif, jpeg, or png of the map you can create an Image using ToolKit.getImage(URL url) or ToolKit.getImage(string fileName) depending on if its a local or web file. Then you use a MediaTracker to complete the loading of the image. And finally...

Java: hi, fourth generation language, present project
fourth generation language, present project, lionel: Hi, Am really sorry. Though I can answer this question I would suggest you ask this question in the section of computer science of the same site as I am pressed for time in my present project. The link is as given below. Hope it helps. http://www.allexperts.com/browse.asp?Meta=305...

Java: hi, interger, logical problem
interger, logical problem, main string: public class Entry { public static void main(String arg[]) { try { byte bt[] = new byte[255]; int length = System.in.read(bt); byte b[] = new byte[length]; System.out.println (length); System.arraycopy(bt,0,b,0,length-2);...

Java: hi, global message, client ip
global message, client ip, chat program: The tasks are as follows : server - * fetches data from each client * appends data to a global message (hold a collection of all clients, so that this is possible.) * broadcasts the same to all users * similarly fetches each client ip, and name and...

Java: Thanx i'll send u the interface..., public abstract void, interface class
public abstract void, interface class, abstract object: Hey Anthony, All but a few of the errors i m getting are complaining about StorageException . This is an exception which is neither included in the standard Java library and isn t included with your two classes. I suspect this exception came from a thirdparty...

Java: hi,A simple question,..., mearly, private key
mearly, private key, hackers: Signing a jar mearly means that you are asserting that this jar came from you and it is unmodified. There is no legal problem. The effect of having a certification authority generate it just makes it more difficult (for hackers) to determine your private key,...

Java: hi, fourth generation language, flexability
fourth generation language, flexability, gl: 3rd gen languages interact directly with the machine, you can tell the computer exactly what to do. Whereas 4th gen languages describe the results but not how it happens. Because optimizers are not perfect it is generally more efficient to use 3rd gen. 4th...

Java: highscores, fileoutputstream, high scores
fileoutputstream, high scores, data structure: A vector is just a data structure that works like a resizable array. If you are going to use exactly 5 high scores, you might as well just use an array. There are a number of ways to store the high scores. A simple one is to use a DataOutputStream/DataInputStream...

Java: Icon, awt event, java awt
awt event, java awt, swing event: It depends on what the icon is. If its an instance of the Icon interface then you can simply call its paint method. If its an Image then you can use Graphics.drawImage method (see http://java.sun.com/javase/6/docs/api/java/awt/Graphics2D.html) You can...

Java: Image to Buffered Image, image png, image object
image png, image object, fileoutputstream: 1. Simply draw the image to the buffer. 2. ImageIO class is the only class in the standard api which saves images. There are various other 3rd party libraries which save images to spefic formats. 3. BufferedImage image = ... ImageIO.write(image, png ,new...

Java: Image to BufferedImage Conversion, image object, quick reply
image object, quick reply, image type: Jules, 1. How can we convert an Image type to BufferedImage type for saving. Well, BufferedImage is a subclass of Image. But the important thing for ImageIO.write is that the object implement the interface RenderedImage. You can use the ...

Java: Image problem, chapter11, binu
chapter11, binu, drawimage: Hi, Am sorry that I was out of town and missed changing the vacation status. The delay would be present due to the fact that image is generally loaded and used only when the drawImage is called. A general note on image loading and rendering is on the...

Java: ImageCompression in java, gujarat india, dynamic gui
gujarat india, dynamic gui, javaswing: Your question is a bit hard to understand, but if all your asking is how to mimic the behaviour of winzip (no JPEG questions) then... If you just want to use the standard java zip support you will have to rewrite the file if you wish to update the contents...

Java: ImageIcon and getPath(), unc paths, path work
unc paths, path work, jlabel: Mahmoud, The simplest way to make your icon file path work in this case is to use a File object. String iconfilename = mychooser.getPath(); File iconFile = new File(iconfilename); URL iconURL = iconFile.toURL(); ...