|
DefaultListModel dlm = new DefaultListModel();
JList list = new JList(dlm);
dlm.add("Jack");
dlm.add("Jill");
dlm.add("Mary");
.
.
.
Hope this helps...
|
|
|
|
|
can i access vc++ program from java????
if answer is yes can u send me the sample code please.
|
|
|
|
|
I want to write a text file for windows notepad to read.
I do not want the Unicode character in the file.
Any suggestions?
|
|
|
|
|
|
This is my entire class.
The compiler keeps saying 'Illegal start of type on the "for" loop.
My question is, what is wrong?
import java.util.*;
public class wordsNoun extends wordsArrayClass
{
final int nounMax = 4;
final String noun[] = {"boy", "girl", "dog", "town", "car"};
for( int i = 0; i <= nounMax; i++)
{
addElement(noun[i]);
}
}
|
|
|
|
|
Never mind. I got it.
I though Java would give me a default constructor.
Apperently, I had to specify one.
Thanks people.
|
|
|
|
|
Hi!
Im using JACOB, a JAva-COM Bridge ( http://users.rcn.com/danadler/jacob/ )
to load ActiveX Components in Java.
JACOB is a port of Microsofts com.ms.com.* & com.ms.activex.* Classes only
available in the MS-JVM.
I'm experimenting with WMI (Windows Management Instrumentation) ActiveX
Components in Java and I am wondering how to enumerate the objects of the
WbemObjectSet (resultset).
Thanx for your help, Lothar.
In Java:
import com.jacob.com.*;
import com.jacob.activeX.*;
class WMI {
public static void main (String args[]) {
ActiveXComponent sC = null;
Object sControl = null;
if (sC == null) {
sC = new
ActiveXComponent("winmgmts:{impersonationLevel=impersonate}");
sControl = sC.getObject();
}
Variant arg[] = new Variant[1];
arg[0] = new Variant("Select * from win32_logicaldisk");
// execute query and get a WbemObjectSet
Variant vCollection = sC.invoke("ExecQuery", arg);
// get number of objects in set
Variant vCount = Dispatch.get(vCollection.getDispatch(), "Count");
System.out.println(vCount.toShort() + " records");
// enumerate objects in WbemObjectSet (vCollection)
// ???
// get object with relative path given as argument out of the object set
Variant objWbemObject = Dispatch.call(vCollection.getDispatch(), "Item",
"Win32_LogicalDisk=\"C:\"");
Variant strMofText = Dispatch.call(objWbemObject.getDispatch(),
"GetObjectText_");
System.out.println(strMofText);
}
}
Enumeration in JScript:
// This script demonstrates how to dump properties from instances of
Win32_ComputerSystem.
var service = GetObject('winmgmts:{impersonationLevel=impersonate}')
var Systems = new Enumerator (service.InstancesOf("Win32_ComputerSystem") );
for (;!Systems.atEnd();Systems.moveNext())
{
var System = Systems.item();
WScript.Echo (System.Caption);
WScript.Echo (System.PrimaryOwnerName);
WScript.Echo (System.Domain);
WScript.Echo (System.SystemType);
}
Enumeration in VBScript:
' This script displays all currently stopped services.
for each Service in _
GetObject("winmgmts:{impersonationLevel=impersonate}").ExecQuery _
("Select * from win32_service where State='Stopped'")
WScript.Echo " ", Service.DisplayName, "[", Service.Name, "]"
next
|
|
|
|
|
Hello,
I am trying to create a program in Jaa that will have a non rectangular main window (with rounded corners). The most i could force Java to do for me is to have some sort of transparency in the corners, but i still have the rectangle frame around them, so i have a rounded window with a rectangular frame around it.
Also, i had some problems with clipping in Java. The result was somehow similar to the behaviour i got for windows.
Does anybody know what i did wrong? Or is this a technical limitation of Java?
Thanks.
Bogdan
ps: i don't want to call external modules from my Java app to draw the interface, i need to do it only in Java. I have tried JDK1.3 from both IBM and SUN.
|
|
|
|
|
i am searching for ages for that source code
if you can give me a link i will be very happy
|
|
|
|
|
Hi,
I have created an application in JAVA. A small popup menu application which works fine in Windows NT. I want to test that in Solaris server.In that it is not showing the popup menu on right click of mouse.
Do I have to change my piece of code if I want to make the application work on Solaris Server ?
Pls help me.
It is very urgent.
Thanks in advance.
A code snippet would be helpful to me.
|
|
|
|
|
Hi Everyone,
I have dificultation when print a grafico using
chart.class.
I have Netscape e explorer, both not print full
picture, this is print part of picture(1/4).
Please evebary can help.
Thanks.
|
|
|
|
|
Hi everyone,
It very difficult on making the kind of Java 3D for my personnal project.
How make a class who make rotating one object in Axis Y direction ? Like MouseRotateY , but i would with the PICKING technic.
|
|
|
|
|
I want a threaded discussion component written in Java which I could use in my web site for the discussion. From where can I find such componen?
|
|
|
|
|
i am interested in putting together a group of people
to build a new programming language. The langauge would
have its roots in java and c++. it would have a virtual
machine that would run a byte code, the virtual machine
would provide hooks for debugging. the souce files would
work like java, with one public class per source file and
with the source file having the name of the class. one
of the big differences from the current java standard would be multiple inheritance and implementing templates.
This way STL could be used in the language. Also i would
like the run time to have the ability to support either
garbage collection or the the new-delete of c++.
I would like to put together a spec at first and would like to get other people to submit ideas and to work on the project. I am tired of the stanglehold that sun has.
Sun invented java and if they want to guide it that is
fine. But i would to like to put together a group that will work on an open-source project that can take the best of both java and c++.
please contact me if you have ideas or would like to work
on such a project!
thank you
|
|
|
|
|
I think it'd be great to have a language such as the one you describe. Something that draws from the strengths in these two languages:
C++
----
1. Templates.
2. Object instanciation on the stack.
3. Destructors.
4. Multiple inheritance.
5. Default parameters.
6. Operator overloading.
7. Preprocessor macros.
8. Control of memory allocation/deallocation.
Java
-----
1. Compiler-enforced exception handling.
2. A "finally" clause.
3. Consistent sizes for primitive types across platforms.
4. Inner classes.
5. Built-in UNICODE-ready string class.
6. Garbage collection.
7. Threads and synchronization.
If you can come up with such a language, I'd be happy to use and promote it. Unfortunately I have neither the time nor the knowledge to contribute for a project of this magnitude. Still, I wish you the best of luck.
Regards,
Alvaro
PS. Have you thought what you're going to call it?
|
|
|
|
|
Yeah, how 'bout Microsoft's C#.
|
|
|
|
|
It's funny how C# came along just a few months after I had posted my message. Personally I think C# is pretty nice -- certainly a bit more like C++ than Java is. However, it's still doesn't have all the C++ features I would have liked to have seen, like
1. Templates.
2. Object instanciation on the stack.
4. Multiple implementation inheritance.
5. Default parameters.
7. Preprocessor macros.
But it does have other features that neither Java nor C++ have, which in a way makes up for the missing C++ features.
|
|
|
|
|
hi,
can some1 tell me how to display japanese character with java internationlisation.
i have an input file messagebundle_jp_JP.property with japanese characters. but it shows rubbish
unless i have some japanese reader program like NJwin is running..
is there a way to display the jap without the NJwin running ?
thank u
|
|
|
|
|
Hi,
Can you provide me any LINK that provide FREE CHAT APPLET with SOURCE CODE...
Thanks.
|
|
|
|