| Advanced Tooltips in Java |
|
 |
Index ‹ java-programmer
|
- Previous
- 2
- FREE JAVA GUIDE- free Java, j2ee, sql and plsql tutorialsThis site lists General Java tutorials and tutorials on specific Java
programming topics. This site lists fully documented java tutorials, java
servlets, JSP pages, and related Java technologies like sql tutorials and
plsql tutorials
All this at http://www.freejavaguide.com
--
Message posted via JavaKB.com
http://www.javakb.com/Uwe/Forums.aspx/java-setup/200604/1
- 2
- Eclipse 3.3 - external tool arguments issue.
I run the WebSphere command line wsadmin java tool as external tool in
Eclipse. It works fine except where an External tool argument has an
"=" sign as in "-javaoption -Dcom.ibm.ws.management.standalone2=xxxx".
Wsadmin picks up the "-Dcom.ibm.ws.management.standalone2" variable
but not the value. Seems that the Eclipse "arguments" dialog
truncates values after the "=" sign. Is there a way around this.
The arguments are listed below.
-user 1234 -password xyz
-lang jacl -host 11.11.11.11. -port 1111
-javaoption -Dcom.ibm.ws.management.standalone2=xxxx
-wsadmin_classpath C:\WASAdminSBV\WSAdmin\WAS5.1\JACL\proclib.jar
-f ${resource_loc}
The problem does not occur when Wsadmin is run from the command line.
- 3
- Four Mobile Phone Makers to Create Linux Platform
Roy Schestowitz wrote:
> Mobile phone companies join forces on Linux
>
> ,----[ Quote ]
> | Four mobile handset makers are teaming up with two cellular operators
> | to develop a new Linux software platform for mobile devices.
> |
> |
> | Cell phone makers Motorola, NEC, Panasonic Mobile Communications and
> | Samsung Electronics, along with mobile operators NTT DoCoMo and Vodafone,
> | expect to announce on Thursday plans to form an independent foundation to
> | develop a common mobile Linux-based platform. They will use this platform
> | to develop new products, applications and features.
> |
> | Linux, an open-source operating system, is already available on a wide
> | range of mobile handsets. Motorola alone says it has shipped more than
> | 5 million Linux-based handsets, mostly on smart phones, such as the
> | Ming model shipped in China. In addition, Motorola just launched the new
> | Rokr E2 music phone in Asia, which also uses Linux. The Rokr E2 will
> | soon ship in Europe.
> `----
>
> http://news.com.com/2100-1039_3-6083883.html?part=rss&tag=6083883&subj=news
>
> If this is not proof of GNU/Linux taking over, I don't know what is... Nokia,
> Palm and others are no exception.
Symbian is by far the dominant mobile OS worldwide and don't see that
changing soon, although tons of linux phone shipments to china, which
has the largest mobile subscriber base in the world holds hope.
As always, Java ME is the application platform for all these devices.
*Posted from my u know what...
- 3
- load servlet mappings at runtime in tomcatCan anyone suggest a way to achieve dynamic servlet mappings in tomcat 5.5.
What I want to do is run a web app with any number of paths all pointing to
one servlet. These paths would be loaded from a database and extra paths
can be added at runtime by the user. So an example would be
www.domain.com/sample and www.domain.com/anothersample would both execute
the same servlet.
Another option I thought of was having a custom 404 servlet that would check
the request supplied and then redirect.
- 8
- using jsp:setProperty on non-simple types.Hi,
I'm currently having a small problem with my application. I'm using
some simple classes that wraps simple types to help me provide multiple
representation. For example, a DateCBO calls wraps the Date type and
gives me the oportunity to have various 'getters' like
getDateShortFormat(), getHtml(), getDateLongFormat() and so on.
My beans are using this kind of wrappers as their properties.
I have already made a custom tag to retrieve information that i use
instead of the standard jsp:getProperty
Now, i'm trying to use the jsp:setProperty to initialise the bean
property, but i have 'Could not coerce String to non-primitive type
StringCBO without bean property editor (JSP 1.2: 2.13.2.1) at line 13'
error.
Is there an interface that i can use to allow direct usage of
'jsp:setProperty', or should i create a custom tag as well.
thanks.
- 8
- How to convert a C++ Object to a JNI jobject in order to use GetObjectClassI have an interface object of type ISubscribe and I am trying to cast
the ISubscribe object to a jobject so I can call GetObjectClass in
order to proceed with a callback using JNI.
ISubscribe * s
jclass cls = env->GetObjectClass(s);
Does anyone know how I can do this in C++? I tried using
reinterpret_cast<jobject>(s) but GetObjectClass does not like that. Any
ideas would be appreciated.
Thanks,
Vijayk
- 8
- mouseClicked vs. mousePressed on Apple vs. WindowsI'm writing a Swing component which must function similarly on Apple
and Windows; and am having trouble with which event to fire off of
(this is effectively a toggle button which would ideally just be
interested in mouseClicked). For a variety of other reasons, I don't
want to make my code act on the mousePressed event.
Originally, our QA person asserted that it was busted because she was
clicking (and moving the mouse > 10 pixels) and it wasn't getting
"toggled" (this was on Windows). I won the battle there by saying
"don't move it 10 pixels; that's a drag, not a click". (after
debugging and figuring out that if you moved the mouse more than
approximately that much, the mouseClicked never came in).
However, she now claims that on Apple (OSX) that the button fails to
toggle if you move the mouse even one pixel while pressing the button.
(i.e. if you are not perfectly still while clicking).
Obviously this would be a different story. I don't have immediate
access to an Apple machine, so was wondering if anybody else had seen
this behavior. When I worked on the AWT on OS/2 at IBM, it was fairly
clear that the mouse events were determined based on native operating
system events (i.e. when Windows says it is a click, we'll say it is a
click). Don't know if that's true now or not, since I haven't seen the
code since Java 1.1.8.
---
Mike Dahmus
m dah mus @ at @ io.com
- 9
- Regular expressions question!I'm trying to parse HTML tables, so I need to find following pieces of text!
<table .....anything between this ..... /table> and
<tr ........ /tr> and
of course
<td> 'part that I need' </td>
I do not know how to put that into regular expression!
Thanks!
- 10
- ain't java grand ?I just got this error message from the java 4.2 compiler.
---
Consulting.java:152: cannot resolve symbol
symbol : variable $
location: class Consulting
perchance you meant '.'
---
Ain't it just the coolest message you've ever seen?
- 10
- Opportunities in U.K./Great Britain?I have a friend who recently moved to Madrid. He had a Dutch passport
so EU access was relatively easy for him. We both lived in D.C., but
I remain US citizen by birth.
My question is, he says it's becoming more popular for J2EE
development in Great
Britain and the UK. I'm wondering how good is the market? (in
relation to US) How good is it for US programmers? (any demand for US
borne skills) And if any of these are true, how hard it is securing
work permit? (etc) Finally is there any idea what standard of living
might be like?
Given all of this would there be sacrifices, or would it just be
better overall simply to stay in US?
- 15
- JSP web hosting companies?I have account at http://www.eatj.com/index.jsp. It is good one.
Daniel wrote:
> Does anyone know of web hosting companies supporting JSP?
- 15
- JDialog focusHi,
Is it possible to ensure that, upon setVisible(true), a JDialog pop-up
jumps on top of all other windows including other applications?
Many thanks in advance!
Aaron Fude
- 16
- 16
- Ultimate enterprise design pattern for 3 tiered appsSo, I feel I am close here is what I have so far.
Goal: Database driven selection of controls on forms
Goal: Business rules only aware of interfaces
Goal: Presentation layer only aware of interfaces
Database Table Person: Name, BirthDate, Gender, CreateDate, CreatedBy
Value Object:
public class Person {
private String name;
private DateTime birthDate;
private int gender;
private DateTime createDate;
private int createdBy;
}
Business Layer Object:
public interface IPersonModel {
public boolean isTeenager();
public boolean isMale();
public boolean isFemale();
}
Presentation layer Multi Column List control
public interface ITableList {
public int rowCount();
public Object getItemAtRow(int row);
public Object getValueAtRowColumn(int row, int column);
}
public interface ITableItem {
public Object getValueAtColumn(int column);
}
The most complex part is storing in a database table which fields on
the value object will be presented in the multi column list control.
It needs to be user friendly and maintainable.
One time I tried having each value object with a switch statement for a
unique number for each field. So the database contents and source code
are kept in synch e.g. 266 in the database means 'Person CreateDate'
and the value object returns that when implementing ITableItem.
It worked but relies on a code generator to make it all work.
This time around I thought I could keep a script in the database so the
user would pick the first column to be person.getCreateDate(), the
second to be person.getName() etc.
Using reflection I could generate on the fly which attribute will be
displayed in which column.
Anyone think of other options?
The other thing I need to change is it seems an unecessary dependency
for the value object to implement ITableItem - there probably needs to
be another class which does it and depending on the database values
pulls the data from the value object.
The same goes for the value object implementing the business rules.
While probably not too bad if it does, perhaps mapping the values to
something that does might work better.
Apart from the value object I am trying to anything else in all the
code knowing about fields which are only used for CRUD e.g. createDate.
CreateDate may never be used for logic - in my app - ever - so why
pass it around as business objects - better to only have things
implementing interfaces where needed.
What do you think so far?
- 16
- jni gcc mangled names//Crapo.java
public class Crapo {
static {
System.loadLibrary("Crapo");
}
native public static int magicNumber(int n);
public static void main(String... args) {
System.out.println(magicNumber(246));
}
}
//Crapo.c
typedef long long __int64;//gcc doesn't recognize __int64
#include "Crapo.h"
/*
* Class: Crapo
* Method: magicNumber
* Signature: (I)I
*/
JNIEXPORT jint JNICALL Java_Crapo_magicNumber(JNIEnv * env, jclass c,
jint n) {
return 47;
}
//run gcc -mno-cygwin -Wl,--add-stdcall-alias -shared -o Crapo.dll -I
"C:\Program Files\Java\jdk1.6.0\include" -I "C:\Program
Files\Java\jdk1.6.0\include\win32" Crapo.c
//output of nm Crapo.dll
10003040 b .bss
10003020 b .bss
10003000 b .bss
//............ 30+ lines of this crap
1000505c i .idata$5
//..........................
100011d0 T _DllMain@12
10001000 T _DllMainCRTStartup@12
100011c0 T _Java_Crapo_magicNumber@12//<-----------------
10001360 T __CTOR_LIST__
10001368 T __DTOR_LIST__
U __RUNTIME_PSEUDO_RELOC_LIST_END__
U __RUNTIME_PSEUDO_RELOC_LIST__
//................... more crap; to me at least
//it was my understanding that --add-stdcall-alias when passed to the
linker should remove the @12 of _Java_Crapo_magicNumber@12
//run gcc -mno-cygwin -shared -o Crapo.src -S -I "C:\Program
Files\Java\jdk1.6.0\include" -I "C:\Program
Files\Java\jdk1.6.0\include\win32" Crapo.c
//remove @12 from Crapo.src
//run as -o Crapo.obj Crapo.src
//run ld -shared -o Crapo.dll Crapo.obj
//run nm Crapo.dll
U .bss
U .data
10001000 t .text
10001000 T _Java_Crapo_magicNumber
10001010 T __CTOR_LIST__
10001018 T __DTOR_LIST__
10002000 A __RUNTIME_PSEUDO_RELOC_LIST_END__
10002000 A __RUNTIME_PSEUDO_RELOC_LIST__
10001010 T ___CTOR_LIST__
10001018 T ___DTOR_LIST__
//... more crap
// by manually removing the @12 from the assembly source produced by
gcc and then separately assembling and linking solves the problem.
//I like the fact that their are far fewer unnecessary symbolic names.
Yet I was hoping their was a one step command-line option to be sent,
like --add-stdcall-alias? Any reason that doesn't seem to work for me?
//It's my understanding that -Wl,--add-stdcall-alias command-line
option is sent to the linker by gcc, and then subsequently sent to
dlltool where the option should result in the @nn's being removed from
the table of symbolic names. Is this correct?
|
| Author |
Message |
shraddha

|
Posted: 2005-2-25 1:32:00 |
Top |
java-programmer, Advanced Tooltips in Java
Hi
I want to implement dynamic interactive tooltips in java so that the
user can expand / collapse them. Also, if there are hyperlinks in the
tooltip text, the user should be able to follow up this link. For the
same purpose, I need to be able to catch any events associated with
tooltips.
I tried to search a lot on how to customize the behavior of tooltips in
Java, however couldn't find any useful information. Does anyone know
about how to proceed about this? Any suggestions / pointers would be
greatly appreciated.
Thanks,
Shraddha
|
| |
|
| |
 |
| |
 |
Index ‹ java-programmer |
- Next
- 1
- [encoding]Stupid question regarding encodingI have written a java plugin for an application that reads a file to execute
a series of actions ; when I parse my text file I check for the existence
of the following line "#HEADER" ; it works fine on my equipment ; on
Windows somebody working with the text file encoded in utf-8 told me that
there is problem as the line containing "#HEADER" is not found !
Now I am a little bit puzzled about all this :
(a) when you write java code and compile it what happens to the
string "#HEADER" because it will be used in the following test :
if (line.equals("#HEADER") {...}
where line is read from the text file with encoding as is on the machine
where the class is executed ? in other words you are comparing what to
what ?
(b) when with a Java app you read a text file can you get its encoding
format like utf-8 or ANSI or whatever to decide about some actions to be
taken ?
I think the problem could be easily solved by replacing "#HEADER"
by "_HEADER" but I have to go to the bottom of this to understand what is
going on.
Thanks
- 2
- Accessing the name of the CLASS/JAR file invokedHello,
I am trying to pack all my files into a JAR - this includes CLASS
files and other textual files such as help, std configs, etc.
I would like to be able to extract them from the Java app straight out
of the JAR - and for this I need to know what the name of the JAR file
invoked was (it might have been renamed for X reasons)
Is there any sure way to do this? (the alternative is to have an
external file to contain said data, but I want to know if a way to
have everything self-contained exists, first)
Thanks,
Andrew
- 3
- [OT] Project documentationWell, they _are_ all Java projects... but it's OT, I know. I need to get a
handle on project documentation. Can someone toss out some options for
generating documentation? What is (or could be) behind the numbered
chapter/section/subsection format of the various PDF files (specifications
and manuals) that I download?
I have so far adopted the xml and xsl transform found in many Apache and
Jakarta projects, and that has helped tremendously for HTML documentation,
but I need to be able to hand over a document and say 'this is what I'm
building'.
Thanks,
Wendy
- 4
- Weird Problem w/ DecimalFormatThe following code snippet:
static DecimalFormat nf=new DecimalFormat("#####.00");
System.out.println(nf.format(1000.10));
sometimes stops working properly and instead of seeing 1000.10 I see 1000,10
(note the comma). I can't for the life of me figure out what is going on...
I'm using Java 1.3.1 on a Sun workstation.
Any ideas?
Cliff
- 5
- newbie with compilingHi
I am new to Java world, I download java version j2sdk1.4.1_01 to my
computer, and install it
when I try to compile program from command line type javac tst.java, I got
the following error
"Exception in thread "main" java.lang.NoClassDefFoundError:
com/sun/tools/javac/Main"
however, I can use textPad to compile it, when I try to run from textPad, I
got same error:
Thanks advance
Libin
- 6
- BPEL Products(Business prcess execution Language 4 webservices)Hi,
I had a few questions about BPEL products
1) Can you let me know the BPEL Servers available in the market. Do
these need to be integrated with J2EE appservers or can they run as is
if all I want to do is integrate a few Java applications and
webservices to the flow.
2) How powerful are Weblogic Integration suite and Websphere MQSeries
Integrator for integrating Webservices using BPEL. Also how easy is it
to develop this kind of flow. Collaxa has a more pure BPEL product
that seems easier for the above task.
Thanks in Advance,
Regards,
Rahul
- 7
- has anyone gotten this exception using SkinLF?I get the following exception when loading certain skins with SkinLF
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at
com.l2fprod.gui.plaf.skin.impl.gtk.GtkSeparator.getPreferredSize(GtkSeparator.java:92)
at
com.l2fprod.gui.plaf.skin.CompoundSkin$CompoundSeparator.getPreferredSize(CompoundSkin.java:961)
at
com.l2fprod.gui.plaf.skin.SkinSeparatorUI.getPreferredSize(SkinSeparatorUI.java:84)
It only happens when i try and load certain dialogs, and I'm not sure
which dialogs it happens it. I can try and come up with a small example
if no one has seen this before. (An example of a skin this occurs with
is: b0sumiErgothemepack.zip)
thanks!
- 8
- JButton layout - equal width with no absurd stretchThank you for taking the time to enlighten me. I have been searching
and trying different things but nothing seems to work for me. All I
want to do is have a column of JButtons to the left of a JScrollPane.
I want the buttons to have equal widths (the widest button at its
minimum text-fitting width, all others stretched to an equal width) and
be only as high as they need to be for their text. The scroll pane can
fill the rest of the width (and height for that matter). Something
like this:
+----------------------------------+
| |
| +--------+ +-------------------+ |
| | A | | | |
| +--------+ | | |
| | ABCDEF | | | |
| +--------+ | JScrollPane | |
| | ABCD | | | |
| +--------+ | | |
| | | |
| +-------------------+ |
| |
+----------------------------------+
I tried box layout, but then the buttons are not equal widths. Border
layout makes the buttons equal widths, but stretches them to be as high
as the scroll pane. Grid layout stretches them both vertically and
horizontally. I think I tried gridbag layout and had the same problem
as grid layout. The type of layout I want for the buttons reminds me of
how a table would layout in an HTML document. I want to avoid using
literal size values because of L&F issues on other platforms. Shrinking
the height of the scroll pane is not an option. Does anyone have any
suggestions?
- 9
- Is Java really faster than Obj-C ? Should Apple dump Obj-C and go with Java?The old notion that Java on desktops is slow might have to go out the
window if more studies show this:
http://homepage.mac.com/spullara/rants/C1464297901/E775622191/index.html
Again, this points out the fact that there will probably be a
renaissance of Java on desktops as it percolates on Linux and Macs and
Windows desktops. We use Mac OS X iMacs at work and Java apps as
MoneyDance (a personal finance software that runs on all 3 desktops,
although it looks sorta crappy in windows) are very good looking and
extremely fast.
Now, if only IBM's open source eclipse made better looking SWT apps on
Mac and Linux...
- 10
- Java Web Start from CDRoedy Green wrote:
> On Sun, 19 Oct 2003 04:10:19 +0100, "Mike"
> <email***@***.com> wrote or quoted :
>
>>I don't recall having to do that once JWS is installed on the client. The
>>only thing that springs to mind is setting the mime type on a web server:
>
> I got friend to do a JRE install on a Java virgin machine, and lo to
> my delight, it set up the association.
>
> I now how have a self installing Java Web Start CD. I am 99% there. I
> think the problem has to do when you use trailing / and when you
> don't.
>
> You just put it in, and up comes the familiar dialog box about "do you
> Trust this Roedy Green fellah with this certificate."
>
> The key is this little C: program that autorun.inf
> kicks off.. It is crude but simple. It depends on 26 variants of the
> JNLP file being automatically generated.
In a platform-portable language, this is unbelievable. You've prevented use
of your product on anything but Windows.
--
Paul Lutus
http://www.arachnoid.com
- 11
- Serial Port CommunicationsI have a java application that I wrote that collects data from a
serial port on a laptop from a data collection device. Program works
well.
My bosses would like certain conditions to draw more attention than
just using the laptop's monitor. They would like two lights and a horn
to be controlled as well.
Tackling the serial input device was pretty easy, but I am not sure
where to start with this request.
1) I only have one serial port on the Laptop, but they want to control
4 devices (horn, light 1, light 2, data collection device). So how
do I handle that?
2) Where would I go to buy the other devices and what device would I
have my java program talk to in order to control them?
Thanks,
Larry
- 12
- Socket error Windows getInputStreamHello,
Java version is 1.5.0_09. I am trying to connect from a Windows
machine to another Windows machine using sockets . Getting a socket
error for the following line. and throws EOFException
Socket s = null;
ObjectInputStream sin = null;
ObjectOutputStream sout = null;
s = new Socket( host, port );
sout = new ObjectOutputStream( s.getOutputStream() );
//write data to socket
sout.writeObject( req );
sout.flush();
InputStream is = s.getInputStream() );
sin = new ObjectInputStream( is ); // This line gives error
If I step into ObjectInputStream, I see:
public ObjectInputStream(InputStream in) throws IOException {
verifySubclass();
bin = new BlockDataInputStream(in);
handles = new HandleTable(10);
vlist = new ValidationList();
enableOverride = false;
readStreamHeader(); // This line gives error
bin.setBlockDataMode(true);
}
However, the same code works when I try to connect from Linux(Red Hat
Enterprise Linux WS release 4 (Nahant Update 5)) to Windows. Turned
off Windows firewall but no luck.
On the Windows Server I am trying to connect to a server agent waiting
on port 2002 that helps me connect to Citrix running on that machine.
The agent runs as a Windows service.
What could be wrong here?
Stack Trace
java.io.EOFException
at java.io.ObjectInputStream
$PeekInputStream.readFully(ObjectInputStream.java:2228)
at java.io.ObjectInputStream
$BlockDataInputStream.readShort(ObjectInputStream.java:2694)
at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:
761)
at java.io.ObjectInputStream.<init>(ObjectInputStream.java:277)
...
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:
202)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:
173)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:
213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:
178)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:
126)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:
105)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:
107)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:
148)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:
869)
at org.apache.coyote.http11.Http11BaseProtocol
$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:
664)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:
527)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:
80)
at org.apache.tomcat.util.threads.ThreadPool
$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
- 13
- JSpinner causes trouble to JB 2005 designer...X-No-Archive: yes
Hi.
I try to build a GUI with the JB 2005 designer (JB 2005
Enterprise-Trial/Fondation version).
Basically it works until I want to add a JSpinner component. Then this
error happens: "null processing BeanInfo class
javax.swing.JSpinnerBeanInfo"
The component is not added. So I add it manually. But the rest of the
GUI components (following the JSpinner member variable) is mixed up
then.
Is there a workaround to this? Thanks.
-ric
- 14
- DOM tree questionHi all,
For code sample domEcho02.java, every element node will have an empty text
node like below. looks like there is no direct method in the treemodel impl
or in the adaptor class that I can control this. how can I get rid of it?
// sample xml node
<pnode attr1='0'>
<cnode1 att1='attr'><value>blah</value></cnode1>
</pnode>
// will be translated in tree nodes
element: pnode
text: (empty, unnecessary)
element: cnode1
text: (empty, unnecessary)
element: value
text: blah
//should be
element: pnode
element: cnode1
element: value
text: blah
TIA
-d
- 15
- a cuestionHello
Which is the utility of declaring a interface without methods in Java?
thanks
|
|
|