Rohan Baweja

Ranch Hand
+ Follow
since Aug 19, 2001
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Rohan Baweja

How can one launch a browser(IE) window from java. Please give me a code snippet. Thanks
20 years ago
I am looking for a data structure which is like a Map. I have used different classes from the standard api that implement the Map interface. All of them seem to move the data after its been added to the Map. TreeMap sorts according to the keys and HashMap hashes the keys. I am looking for a Map that stores the data in the same sequence as it was added, and also supports standard Map methods.
20 years ago
I've created two circles using Ellipse2D.Double() class and I want to know if its possible to find the coordinates of the two intersecting points from the methods provided in the Ellipse class or it requires some complex mathematical function to evaluate those points. Help me, please. Thanks
20 years ago
I am able to draw various shapes including Rectangle2D.Double object on a JApplet but not able to shift their position. I have tried setFrame() and setLocation() methods but none of these work. I am not sure if I am using them correctly. If someone has come across this problem before, please let me know if you've figured out the solution to this problem and how. thanks
20 years ago
Does any one know how to check only the headers in a folder on an IMAP server.
20 years ago
I am trying to implement a MVC problem.
I have a class which extends the TreeMap class. I am trying to make this class Observable so that when any changes occur in the model data, this class informs all the Observer objects.
The problem with the design I am trying to implement is that I cannot extend both TreeMap and Observable at the same time.
I am sure there's an easy solution to this problem that many of you must have come across before.
Please write the soltion:
My existing class looks something like this and I want to make it Observable.
public class MyTreeModel extends TreeMap {

}
20 years ago
Hi all, I found the solution for JButton text anti-aliasing. The code smoothes the edges of the text on JButton.
public class AntiAliasedButton extends JButton {
AntiAliasedButton( String text ) {
super( text );
}
public void paintComponent(Graphics g) {
super.paintComponent(g);
Graphics2D g2 = (Graphics2D)g;
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON );
}
}
21 years ago
Is it possible to antialiase text on JButtons and JLabels? If you have any experience with it, can you post some sample code with it. Thanks
21 years ago
Hey, Hi everyone, I just wanted to thank everyone for the response.
I think, the best solution for the above problem would be to divide the list into sublists containing which contain same starting letters, and then search through them seperately. For example sublists of A's B's C's and so on. It may not work with a 2.5mb file but smaller dictionary file would be managable.
I have read about all sorts of trees and data structures but I didnt read about balanced trees or trees based on red-black algo. So thank you all for enlightening me, and all the help.
21 years ago
I am trying to search huge text files in java. I tried to load a dictionary file ( 2.5 mb ) which contained words alphabetically one in a line, into a BinarySearchTree but it gave me a stackoverflow. The only thing that worked for me was LinearSearch, which was extremely slow.
Any suggestions for a solution(s)...
21 years ago
Hi,
I am not able to download the Java One Studio 4.0 (previously called Forte) from the Official site. If anyone has the linux installation binary of this or any other previous release of the software, please share it on some ftp server.
Thanks in advance.
21 years ago
Hi,
I want to download Sun One Studio 4(formerly Forte for java). The website generates a dynamic link and the download doesnt have the resume feature. After downloading for around 10-20 mins, the server just cuts me off. If anyone has the linux install binary please put it on some ftp server.
I'll be really grateful
Thanks in advance.
21 years ago
Hi,has any one been working on a chat messenger (yahoo/msn) or chat client( mirc ) ? I am trying to find out all about how they work and what would be the most efficient way to implement one using Java.
I dont want to start developing one of my own but i would certainly like to contribute and learn from any existing projects. Please mail me.
22 years ago
hi
I am working on Java Email Client. The program directory contains 2 subdirs namely LIB and IMAGES. The LIB directory contains the JAVAMAIL jars, which I need use in the main program.
I used this command to make a JAR file of the program so that the existing JAVAMAIL JARS get included in my file.
jar -cvfm mmc.jar Manifest.mf *.class -C lib/
Manifest File
-------------
Main-Class: mmc
Class-Path: lib/activation.jar lib/imap.jar lib/mail.jar lib/mailapi.jar lib/pop3.jar lib/smtp.jar
All though I was successful in creating the jar, it doesnt work because the main class doesnt read the packages from the LIB dir. Can someone help. Thanx
22 years ago
I am working on a program which uses packages from JAVAMAIL. The dir structure where my program is stored is:
progDir
program classes
+-->lib
JAVAMAIL jars

I included the JAVAMAIL dir and IMAGES dir while making the JAR file of the program using this command:
jar -cvfm mmc.jar Manifest.mf *.class -C lib/
My manifest looks like this:
Main-Class: mmc
Class-Path: lib/activation.jar lib/imap.jar lib/mail.jar lib/mailapi.jar lib/pop3.jar lib/smtp.jar
My Jar is not able to run like the normal program. It does not read the packages in the lib folder even when I have listed them in Class-Path.
22 years ago