Win a copy of Spring Boot in Practice this week in the Spring forum!

S Rubia

Greenhorn
+ Follow
since Apr 06, 2003
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 S Rubia

Hi , jgurus
I want to make a desktop application which could send an email to a given address via internet
but without any server means (tomcat or any other)b/c it is an desktop application.
Now i have 2 questions
1-------------Is it Possible???
2------------From wher means which api and which tutorial to start???
18 years ago
Hi , jgurus
I want to make a desktop application which could send an email to a given address via internet
but without any server means (tomcat or any other)b/c it is an desktop application.
Now i have 2 questions
1-------------Is it Possible???
2------------From wher means which api and which tutorial to start???
At the following code.................................................

public void treeCollapsed(TreeExpansionEvent e)
{
Object o=e.getPath().getLastPathComponent();
int index=treeModel.getChildCount(o);
System.out.println("Child counted: "+index);
for(int i=1; i<index ; i++)
{
DefaultMutableTreeNode node=(DefaultMutableTreeNode)treeModel.getChild(o , 1);
System.out.println("child selected is: "+node);
treeModel.removeNodeFromParent(node);
}
}


i got this error..........................................................................................Why???


Child counted: 3
child selected is: servlets
Exception occurred during event dispatching:
java.lang.ArrayIndexOutOfBoundsException: 2 >= 2
at java.util.Vector.elementAt(Vector.java:417)
at javax.swing.tree.DefaultMutableTreeNode.getChildAt(DefaultMutableTree
Node.java:231)
at javax.swing.tree.DefaultTreeModel.getChild(DefaultTreeModel.java:151)

at NodeHandler.treeCollapsed(NodeHandler.java:62)
at javax.swing.JTree.fireTreeCollapsed(JTree.java:2156)
at javax.swing.JTree.setExpandedState(JTree.java:2770)
at javax.swing.JTree.collapsePath(JTree.java:1671)
at javax.swing.plaf.basic.BasicTreeUI.toggleExpandState(BasicTreeUI.java
:2033)
at javax.swing.plaf.basic.BasicTreeUI.handleExpandControlClick(BasicTree
UI.java:2009)
at javax.swing.plaf.basic.BasicTreeUI.checkForClickInExpandControl(Basic
TreeUI.java:1963)
at javax.swing.plaf.basic.BasicTreeUI$MouseHandler.mousePressed(BasicTre
eUI.java:2674)
at java.awt.Component.processMouseEvent(Component.java:3714)
at java.awt.Component.processEvent(Component.java:3546)
at java.awt.Container.processEvent(Container.java:1164)
at java.awt.Component.dispatchEventImpl(Component.java:2595)
at java.awt.Container.dispatchEventImpl(Container.java:1213)
at java.awt.Component.dispatchEvent(Component.java:2499)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:2451
)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:2210)
18 years ago
And ya u forget to send the link of ur doc
18 years ago
Thanks Stefan ,for ur reply BUT
the problem is that there are usually too different types of files in a directory like pictures ,videos,pdf formate , text files , audio files so it is nearly an impossible and time taken task to use file streams for all these type of formats,(means 1st check which type of format is it either byte or character and then use a suitable stream , u know what i mean)
Could there be any more sensible thing possible to drag n drop files,please if any do tell me,
i cant beleive that java dont give support for such a necessary and common task
thanks
18 years ago
Hi , jgrus
im having a problem related to File class,when i want to move one file from one
directory to another directory and i found no such method in File class in jdk1.3 ,so
1------------what should i do for my this problem (means how to copy paste or cut paste
the files from one directory to another).
2------------Is there any support has been included in higher versions means in 1.4 or 1.5.
Thanks .
18 years ago
Well Brian,
I didnt understand it quite that whats ur problem is,if ur problem is only Char 10 which is a Space (i guess) then one simple solution is that u cast the character to int since u r writing the result in a text file so i think that doesnt matter that which type the data is written in file...
i hope this will help u
18 years ago
Well Ernest,
I really appreciate ur multidimensional Knowlegde,also give waitage to ur suggestion BUT the problem is that i have to make a scaner driver for winxp in java (even if it is possible by native code)my real problem is that i had no knowledge abt Plugins or drivers so would u or anyone else kindly tell me any useful informational link abt this or any c++ tutorial related to this topic
18 years ago
Hello all ,
Today my question is
Is it possible to make a scanner driver for WinXP completely in java???
If it is then how means from where to start and by which api to follow?
Another question is that how a driver works means
1--How it communicates with OS
2--How it communicates with Scanner.
cause i have a very little knowledge on this topic so can anyone tell me any comprehensive link on this topic..
18 years ago
Thanks Earnest,
but can u tell me
1--the name of Native Interface and in which package it exists
2--and from which link i can download the API for this Interface..
18 years ago
well gary,
all i understand is that u had a file named AntoniosUtility.java which has a method named reverseThisString and u want to call it from ur class in actionPerformed method ...
If this is right then it is simple in actionPerformed
1-- make an object of ur AntoniosUtility class object as
AntoniosUtility obj=new AntoniosUtility();
(if there is default constructor)
2-- by this object call the required method by the passing String u want to reverse,and store the result in another string or directly displaying it whatever u want
String result=obj.reverseThisString(String);
18 years ago
Hello all,
I want to start JNI ,but i had aconfusion
1--What package or product should be installed to work in JNI And from which link i can download it?
2--about C++ ,that what version of C++ should i used ,I only heard of VisualC++ (microsoft prd) is this required for JnI or there is some other companys C++ required.
again from which link to download?
thanks in advance.
18 years ago
Well Narendran
Try
Runtime.getRuntime().exec("Iexplore [url=http://www.javaranch.com");]http://www.javaranch.com");[/url]
It Will open a new window with given url ..
Atleast opens on my computer.
18 years ago
Hello again,
I want to send a page to someone who didnt know anything abt java and
its plugins ,so i found it out that the following code will install the reqired material to run applet if it is not installed on a pc,but the following code is not working on pc?Can anyone tell me why???
I Sent this problem before but no fruitful reply May be this time any GENIUS see this
<OBJECT
classid="clsid:CAFEEFAC-0014-0000-0000-ABCDEFFEDCBA"
WIDTH = 695
HEIGHT = 525
codebase="http://java.sun.com/products/plugin/1.3.1/jinstall-13-win32.cab#Version=1,3,1,0">
<PARAM NAME = CODE VALUE = CurveApplet>
<PARAM NAME = CODEBASE VALUE = "." >
<PARAM NAME = ARCHIVE VALUE = "CurveApplet.jar" >
<PARAM NAME="type" VALUE="application/x-java-applet;version=1.3.1">
<PARAM NAME="scriptable" VALUE="false">
<COMMENT>
<EMBED
type="application/x-java-applet;version=1.3.1"
CODE = CurveApplet.class
CODEBASE = "."
ARCHIVE = "CurveApplet.jar"
WIDTH = 695
HEIGHT = 525
scriptable=false
pluginspage="http://java.sun.com/products/plugin/1.3.1/plugin-install.html">
<NOEMBED>
</COMMENT>
ALT = "your browser understands the <APPLET> tag but is not running the applet for some reason."
your browser is completely ignoring the <APPLET> tag!
</NOEMBED>
</EMBED>
</OBJECT>
18 years ago
Hello all,
Can anyone tell me the purpose of HtmlConverter.bat file in jdk/bin???
When i on the echo and run it without given any filename it says no file to process and after a class file name no error but no output also..........
18 years ago