|
I'd like to use swing in an applet too, and I don't think I can use the sun java plugin because of the way this applet interacts with other elements of the Windows system.
Microsoft, predicatably, has it's own user interface routines called AFC which are in com.ms.ui.*. The problem is that I can find no on-line documentation for them. J++ displays the bare class structures for me and I've been using trial and error and a few examples I've turned up but it looks like I'm going to have to buy a book.
They do provide stuff like multi-column scrolling lists, trees etc. and in a microsoft-looking format.
Of coursre this probably means you'll have to do it all again if you want a version of the applet to run anywhere but IE.
|
|
|
|
|
When i try rum this command java XXXXXX
This error was come out :
"Exception in thread "main" java.lang.NoSuchMethodError : main"
Any idea to solve it
|
|
|
|
|
A java program must have a public class whith a method main like in the code below:
public class FirstApp
{
public static void main(String argv) //this function must exist in every program that you want to run
{
//some code here
}
}
When you run java FirstApp type the name with apropriate case(java is case sensitive)
|
|
|
|
|
Hi,
How is Java compared to C++ in what matters to standalone programs ???
Thank You,
Pedro
Pedro
|
|
|
|
|
Hmph.. I think different things matter to different stand alone programs. You're doing graphical interfacing and want portability java's pretty good. If it's all about fast number crunching probably not so good. The class library can save you a lot of work, once you can find your way arround it, of course.
I'd say, typically, development time with Java will be faster but the resulting program, perhaps, not quite as clean. For a start it's slughly icky having to run the interpretter every time.
|
|
|
|
|
|
|
Anybody now how to do Insertion sort in Java ( JDK 1.2 )
|
|
|
|
|
Must it be Insertion sort? Why don't you use Quicksort.
If you want I'll send you my little Quicksort-Wrapper-Class...
E-Mail me...
|
|
|
|
|
It entirely depends how your data is likely to be stored. If you want a dense array there are binary chop search routines supplied in the "Arrays" class (and use System.arrayCopy). You should also take a good look at the TreeMap or TreeSet clases one of which will probably handle it all for you.
|
|
|
|
|
Yesterday I posted a message and thanked David Woods for code supplied here in this forum. David was very kind and pointed me to it.. but the code was written by Davanum Srinivas. Sorry Davanum, and thankyou for sharing your code here, got me over a big hump......
Bob
|
|
|
|
|
I was successful implimenting drag and drop from a JTree to Native NT system, used David Woods code he posted here to give me a leg up, thanks Dave, helped alot. I still need to determine the path the object was dropped into the native system though, and have not found a way to pull it out. Anyone have some suggestions ?
|
|
|
|
|
Dear Bob,
i need the code for drag and drop in tree using swing.
i will appreciate if you will forward that code to me.
thanks for your earlier attention.
Avnish.
Avnish
|
|
|
|
|
Dear Bob,
i need the code for drag and drop in tree using swing.
i will appreciate if you will forward that code to me.
thanks for your earlier attention.
Avnish.
Avnish
|
|
|
|
|
Dear Bob,
kindly send me the code of drag and drop
on avnish158@usa.net.
thanks for your earlier attention.
Regards,
Avnish.
Avnish.
|
|
|
|
|
Hi Everybody,
I am new to this foroum..
well i need to implement image in my frame... can anybody help me out in this..
If someone can explain with the example it would be really nice..
naveen
|
|
|
|
|
The java Tutorial!
http://java.sun.com/docs/books/tutorial/uiswing/painting/usingImages.html
|
|
|
|
|
//in the constructor
Image img = getImage(getCodeBase(),"yourimg.jpg");
//override paint in Frame
public void paint(Graphics g)
{
if(img!=null)
g.drawImage(img,0,0,null);
}
Qapla
|
|
|
|
|
Also you can try to use a ImageIcon wich you set on the same color as your background.
|
|
|
|
|
Hi! Is there a possibity of growing or shrinking java-arrays at runtime similar to CObArray in MFC (with Add() or Remove()...) ?
After writing
int array[] = new int[5];
how can I change the size of this array?
Thank you.
Gregor Mitsch
E-Mail: abacus-@gmx.de
|
|
|
|
|
Why not use Vector?
http://java.sun.com/j2se/1.3/docs/api/java/util/Vector.html
|
|
|
|
|
Use the Vector class!
Qapla
|
|
|
|
|
To resize your array you need to create a new one and then copy with System.Arraycopy
It's the same a realloc in c, but you have to write down the code.
realloc(in[] a, int size)
{
int[] newArray = new in[size];
System.arraycopy(a,0,newArray,0,a.length());
a = newArray;
}
Nicolas
|
|
|
|
|
If you have an unknown number of items an array probably isn't your best choice of container. There's a whole subtree of container classes in the java libraries, which one will most suit depends on the way you are accessing the elements. You should consider Vector (if you really need to acces by index) or one of the List classes, e.g. ArrayList if your processing is usually sequential.
|
|
|
|
|