 |
 |
Index ‹ java-programmer
|
- Previous
- 1
- LookAndFeelHi,
I have a couple of issues I'm trying to resolve. Hopefully someone will have
some ideas.
First, I've been unsucessful trying to get the MotifLookAndFeel working.
I've following every example I have (on paper) and nothing seems to work.
I've run the app on both the PC and Linux box; the window looks and feel
shows up on the PC and metal on the linux machine. Anyone know what's going
on or what could be missing?
Second, the app I've been working has a bunch of ToggleButtons and the color
of the button changes based on selection. All I do is set the background
color in the button press callback. Okay, fine. But when I run the code in
linux, I'm unable to change the color of the "select" mode of the Toggle
button. It always gray. Again. Does anyone know what's going on? From all my
years, this should be extremely simple. Why would it work correctly on the
PC and not in unix?
Thanks in advance.
Bryan
- 2
- DOM Partial Document ParsingI am trying to build a Java client which will read a never ending XML
data stream from a socket. Here is a simplified example of the XML
document:
<?xml version='1.0' encoding='us-ascii'?>
<NeverendingDataStream>
<Data>1.0</Data>
<Data>2.0</Data>
followed by a continuous stream of <Data> elements from a server
application that may not send the closing </NeverendingDataStream> tag
for several hours or days.
The DocumentBuilderFactory and DocumentBuilder parser for building a
DOM object tree fails because of a missing end tag.
Is there a way to force partial document parsing? I have turned
validating off but it continues to throw a fatal error.
Thanks,
Gary V
- 2
- Tiles Problem with definitions Error - Tag InsertHi to all,
I have a newbie problem and I would appreciate any help.
Thanks in advance.
I have the following constellation:
struts-config.xml:
<snip >
<plug-in className= "org.apache.struts.tiles.TilesPlugin " >
<set-property property= "definitions-config "
value= "/WEB-INF/tiles-defs.xml " / >
<set-property property= "moduleAware " value= "true " / >
<set-property property= "definitions-parser-validate " value= "true "
/ >
</plug-in >
<snap >
tiles-defs.xml
<snip >
<tiles-definitions>
<definition name="definitionName" page="/layouts/layout1.jsp">
<put name="title" value="to be specified" />
<put name="header" value="/tiles/header.jsp" />
<put name="footer" value="/tiles/footer.jsp" />
<pat name="body" value="to be specified" />
</definition>
</tiles-definitions>
<snap >
All referenced JSP exist in the webapp!
Additionally I have a JSP index.jsp that looks like this:
<snip >
<tiles:insert beanName="definitionName"/>
<snap >
There are no action-mappings in the struts-config.xml!
When I call the index.jsp I receive the following error:
org.apache.jasper.JasperException: Error - Tag Insert : No value
defined for bean 'definitionName' with property 'null' in scope
'null'.
I know, that means that there is no bean with this name in any
context.
I check this with <logic:notPresent name="definitionName"
scope="application">
But I have read that the in the case i figured out, all definitions in
tiles-defs.xml are available in the application context under their
"name" attribute. But it seems that I'm wrong.
Does anyone know what goes wrong here. Or do I have to use
action-mappings to work with xml-based definitions?
Greetings
Stephan
- 2
- To really foul things up requires a computerPartner just got back from a new government job with an amusing tale.
BC is a large province (about 1000 miles top to bottom) so the BC
government decided to set up a computer system so that any printout
could be directed to any printer in the province, thus saving on
courier costs.
However, the default is the system selects a non-busy printer, not
worrying particularly if it is 1000 miles from the intended recipient.
The printouts don't have proper headers to direct them to the person
eagerly awaiting them so most of the printouts ended up in the
shredder.
- 3
- TableCellRender puzzleBelow is a fairly simple TableCellRenderer for displaying an enum as
an Icon. That works fine. But I added a wrinkle, changing the
background colour depending on whether the row is selected.
No background colour changes happen, even though isSelected is true
when it should be. I wonder if I am missing something obvious.
package com.mindprod.vercheck;
import javax.swing.*;
import javax.swing.table.TableCellRenderer;
import java.awt.*;
/**
* render a the AppSate enum cell, use icon without text.
*/
final class AppStateRenderer implements TableCellRenderer
{
// ------------------------------ FIELDS
------------------------------
private static final JLabel template = new JLabel( "",
JLabel.CENTER );
private Color background;
private Color selectedBackground;
// -------------------------- PUBLIC INSTANCE METHODS
--------------------------
/**
* constructor
*
* @param background background colour
* @param selectedBackground background colour when seleced
*/
public AppStateRenderer( Color background, Color
selectedBackground )
{
this.background = background;
this.selectedBackground = selectedBackground;
}
public Component getTableCellRendererComponent( JTable table,
Object value,
boolean
isSelected,
boolean hasFocus,
int row,
int column )
{
System.err.println( "selected:" + isSelected + " " + row + " "
+ table.getSelectedRow() );
template.setIcon( ( (AppState) value ).getIcon() );
template.setBackground( isSelected? selectedBackground :
background );
return template;
}
}
--
Roedy Green, Canadian Mind Products
The Java Glossary, http://mindprod.com
- 3
- [ANN] RMI Plug-in for Eclipse v2.0A new version of the RMI Plug-in for Eclipse (v2.0) has been just released.
In the new version there are two new major features:
(*) RMI Spy - Live monitor of the RMI activity in an RMI application
(*) Ready to use examples - the best way of getting started with RMI in
Eclipse
The RMI Registry inspector has greatly improved and it can now invoke
almost any remote method (in previous version it was only possible to
invoke methods that receive no arguments).
Also new in v2.0 - enhanced Java 5 and Java 6 support.
The standard set of features includes
(*) Automatic stubs genaration
(*) Local RMI registry control (start/stop/clean)
(*) RMI Application Launcher - easy codebase and security policy
configuration.
More info at: http://www.genady.net/rmi/v20/
Genady Beryozkin,
Author of the RMI Plug-in for Eclipse
- 7
- jEdit JavaDebuggerDoes anyone know how to set this plug-in up? I have loaded it in jEdit
but everytime I try and use it it gives a huge long error list and says
I need JDK 1.3 or above, even though I am using JDK 1.5!
Steve
- 7
- where to find graphics for buttonsI'm searching for free graphics to grade up my app by using icons on the
buttons for edit, new, delete, save, cancel and so on.
Java class ImageIcons supports gif, jpeg and png format.
Anybody knows a free available source for this basic app icons?
- 8
- Great SWT ProgramIn article <email***@***.com>,
Twisted <email***@***.com> wrote:
> On Aug 21, 1:30 pm, Joe Attacki <email***@***.com> wrote:
> [Attacki misattributed the quoted text once again]
> [insulting nonsense deleted]
> > Honestly, I don't care if he advertises his open-source project in here,
> > but the fact that he was underhanded about it is what I took issue with.
>
> I've provided a reasonably plausible and much more charitable
> interpretation of his actions. You are quick to see malice where there
> may well be none;
Oh, the irony.
> probably because your own normal behavior is
> malicious, so you expect it of everyone else as your default model for
> a random person's mind is (as is normal) your self-model.
--
B. L. Massingill
ObDisclaimer: I don't speak for my employers; they return the favor.
- 9
- Roedy 's convertor, Where is Short ? Where is Byte?Hi Roedy,
This is what you advertise for in
http://www.mindprod.com/zips/java/converter.txt:
signed byte Byte
unsigned byte Byte
short Short
char Character
int Integer
long Long
float Float
double Double
char[] String
This is what you have in your code:
public static final String [] flavours = {
"boolean",
"/*signed*/ byte",
"/*unsigned*/ byte",
"short",
"char",
"int",
"long",
"float",
"double",
"String",
"Boolean",
"Character",
"Integer",
"Long",
"Float",
"Double"};
Noticed anything? Is it voluntary or did you forget java.lang.Byte
and java.lang.Short?
Either the advertisement or the code need to be updated.
My apologies if you have already explained why.
BTW, neat little tool I always come back from time to time.
Cheers, Mike
- 10
- Eclipse and Tomcat DevelopmentHi,
I am trying to figure out how to change the build path for my java servlets
in eclipse so that my class files are located within my Apache Tomcat
servers class directory. I tried to change the output folder in eclipse for
the project properties but it doesn't seem to accept it as a valid
directory. It only accepts folders with the current projects working
directory (ex. eclipse\workspace\myProject). Any idea how to do this without
the use of plugin's. If not can someone recommend me the most popular plugin
to get this job done. Thanx in advance
Joe
- 12
- generate certificate from PEMHi,
I am developing a middleware solution for our companyy. I have got 2
certifcates clkey.pem and clcert.pem for the final application. How I
can combine these 2 keys in 1 certificate? Do I need to first create
self signed certificate?
Thx in advance.
- 13
- javax and macim running mac os 9.2 with MRJ SDK 2.2. im tring to compile a class
importing javax.swing.*; it says it cant find it. i unziped all the
jars and i cant find javax anywhere. is this not supported on this os.
- 13
- M.I'5.Persecut ion ` h ow a nd wh y d id it st art?-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-= how. and why did it start? -=
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
The harassment didn't start by itself, so someone. must have been there at
the outset to give it a firm push and set the "animals" after me. It. looks
as if I was. set up in June 1990, and the timing indicates someone from
university. was responsible.
>One thing which has. been missing from this discussion is this simple
>prognosis: that maybe he is. right and that, despite his admitted
>mental condition, there really is a campaign against. him organised by
>now-influential ex-students of. his university.
In May or June 1990, Alan Freeman on Radio 1 read out a letter from. someone
who had known me for a few years, who. wrote of the one who "wore out his
welcome with random precision" (from the Pink Floyd. song). Freeman went on
to say to the writer "that's a hell of a letter. you wrote there". The
indication is strongly that. people I had parted from soon before nursed a
grudge against me and were trying to. cause trouble for me.
The suggestion is that Freeman might have shown the letter. to other people,
and things could. have snowballed from there. Right from the start the real
source (security services presumed). didn't announce themselves as the
origin,. but let the "talkers", the radio DJs, believe that they were the
originators. Think about it; if you. announce, "we're MI5 and we have a
campaign against this bloke" then people might not go along. with it; but if
you say, "everyone else. is getting at this bloke because he 'deserves' it"
then people. will join in with fewer qualms.
>Why. would "they" wish to assassinate your character?
It's the classic case of hitting a cripple to prove you're. stronger. Why
would the security services expend hundreds of. thousands of pounds and more
than six years of manpower to try to kill a British citizen? Because. they
are motivated by people who knew me at. university and feel personal
animosity; because they knew me to be emotionally weak, and it is. in the
nature of bullies to prey on those known. to be weak; and because they can
rely on the complicity of the establishment, which the. security services
manipulate and derive funding from. This is. England's biggest humiliation
today,. and the British security services are intent on preventing their
humiliation becoming reality by. continuing their campaign of attempted
murder to suppress the. truth from becoming public.
10751
- 16
- How do i implement this interfacepublic interface AQuestion
{
public abstract void someMethod() throws Exception;
}
http://www.angelfire.com/or/abhilash/Main.html
see Question no 5.
How do i implement this interface ?
(1) problem is, it has an abstract method and hecne its complicated
to implement this class.
(2) another problem is, it is the public interface and hence we can not
make one more public class in the same file....because 1 file can have
only 1 public access specifier.
is it really possible to implement this interface ?
|
| Author |
Message |
Rudy

|
Posted: 2003-9-18 20:20:00 |
Top |
java-programmer, Set jtable cell colours
Hi,
How do i change the colour of a cell in a Jtable, looked at api but couldnt
find anything.
Thanks
Rudy
|
| |
|
| |
 |
tor.wilhelmsen

|
Posted: 2003-9-19 19:40:00 |
Top |
java-programmer >> Set jtable cell colours
"Rudy" <email***@***.com> writes:
> How do i change the colour of a cell in a Jtable, looked at api but couldnt
> find anything.
You need a custom CellRenderer
|
| |
|
| |
 |
Rudy

|
Posted: 2003-9-20 19:51:00 |
Top |
java-programmer >> Set jtable cell colours
Thanks will have a look
Rudy
"Tor Iver Wilhelmsen (TeamB)" <email***@***.com> wrote in message
news:email***@***.com...
> "Rudy" <email***@***.com> writes:
>
> > How do i change the colour of a cell in a Jtable, looked at api but
couldnt
> > find anything.
>
> You need a custom CellRenderer
|
| |
|
| |
 |
| |
 |
Index ‹ java-programmer |
- Next
- 1
- Array optimizing problem in C++?
From an old post by James Kanze
On Apr 9 2003, 5:42 pm, email***@***.com (James Kanze) wrote:
>When I pass an "array" to a function in C/C++, I actually pass
>a pointer to the first element. And the compiler, when it compiles the
>function, only sees pointers -- it has no way of determining any
>relationship between them. Consider, for example, a smoothing function
>(in C or earlier C++):
>
> void
> smooth( double* dest,
> double const* src,
> size_t len )
> {
> for ( size_t i = 1 ; i < len - 1 ; ++ i ) {
> dest[ i - 1 ] = (src[ i - 1 ] + src[ i ] + src[ i + 1 ]) / 3 ;
> }
> }
>
>
>The compiler cannot arrange to use the src[ i + 1 ] value from the
>preceding pass through the loop as the src[ i ] value in the current
>pass, since the write to dest[ i - 1 ] might have changed it. In Java,
>it can, since two arrays are either identical or disjoint.
>
>
>This sort of code shows up frequently. In benchmarks from Java
>suppliers comparing Java to C++, of course:-). But also in any number
>of applications dealing with physical measures: meteorology, geophysical
>research (oil prospection), etc.
Out of curiosity, I tried to test if the above is true. It didn't make
any difference. In fact, C++ was a bit faster (not by much, just 6%).
Probably due to array bound check in Java, if there is in indeed an
issue with C++ arrays, overall there is no difference.
==c++==
#include <iostream>
#include <cstdlib>
#include <ctime>
void fill (double* src, int len);
void smooth (double* dest,
double const* src,
int len );
int main()
{
const int len = 50000;
double src_array [len] = {0};
double dest_array [len] = {0};
fill(src_array, len);
clock_t start=clock();
for (int i = 0; i < 10000; i++)
smooth (dest_array, src_array, len);
clock_t endt=clock();
std::cout <<"Time smooth(): " <<
double(endt-start)/CLOCKS_PER_SEC * 1000 << " ms\n";
// doesn't work without the following cout on vc++
std::cout << dest_array [0] ;
return 0;
}
void smooth (double* dest, double const* src, int len )
{
for (int i = 1 ; i < len - 1 ; i++ ) {
dest[ i - 1 ] = (src[ i - 1 ] + src[ i ] + src[ i + 1 ]) / 3 ;
}
}
void fill (double* src, int len)
{
srand((unsigned)std::time(0));
for (int i = 0 ; i < len ; ++ i ) {
src[i] = rand();
}
}
==== java ========
import java.util.*;
public class Arrays{
public static void main (String[] arg)
{
final int LEN = 50000;
double[] src_array = new double [LEN];
fill(src_array, LEN);
double[] dest_array = new double [LEN];
long start = System.currentTimeMillis();
for (int i = 0; i < 10000; i++)
smooth(dest_array, src_array, LEN);
long end = System.currentTimeMillis();
System.out.println("Time smooth(): " + (end - start) + " ms");
}
static void smooth (double[] dest, double[] src, int len )
{
for (int i = 1 ; i < len - 1 ; i++ ) {
dest[ i - 1 ] = (src[ i - 1 ] + src[ i ] + src[ i + 1 ]) / 3 ;
}
}
static void fill (double[] src, int len)
{
for (int i = 0 ; i < len; i++)
src[i] = Math.random();
}
}
- 2
- Slavemode in CLDC HotSpot ImplementationHello All,
I have a small query regarding CLDC Hopspot Implementation... I hope
some of you would kindly find some time to answer the same :)
I have to do an OS-porting of Hopspot Implementation and I have just
started to analyze the code... As I understand, in slavemode, the
control would be given back to the calling function after the JVM has
executed few bytecodes. Now:
1. Is there any way to control the number of bytecodes/instructions the
JVM executes before returning.
2. If the return value of JVM_TimeSlice() is not -1 or -2, is it
advisable to change the return value of the function? If yes, what is
the best way to achieve this? [This is to have a better control on JVM]
I hope I have made my point clear enough, anticipating an early
response,
Best Regards,
- Rohit Malaviya
- 3
- netbeans uml pluginhi,
does anyone know if there is a plugin that will create uml diagrams from my
java code for the netbeans ide? i have looked on their website and they say
to use poseidon, but i have not really been able to integrate it into my
netbeans ide.
thanks
Jochen Opp
- 4
- Row "headers" in JTableJ2SE 5.0_05 on Windows Server 2003 SP1.
What I want to do is something like a column header only it's a row header
that is effectively a JTable column that is fixed in position on the left of
the view and can't be reordered or gain focus.
Is this possible? I've looked through the documentation and done a Google
search but can't find anything which probably tells me that it can't be
done. What are your thoughts? It probably needs scroll behaviour similar
to a header too.
Thanks,
Wes
- 5
- Java rendering problems when antialiasing is enabledI've written a Java app which uses Swing to display images and text.
The app consists of a JFrame which contains a JPanel-derived class. In
the paint() method of the JPanel-derived class, I call
Graphics.drawImage() to render an image file previously loaded with
ImageIO.read().
This was working fine until I enabled antialiasing in my video card
settings (GeForce FX 5200 w/128MB RAM, Windows XP SP2). With
antialiasing, none of the content gets rendered in the window. The
problem exhibits itself when I'm tring to render the image myself and
when I just have a JProgressBar control displayed in the window (i.e.
the Swing components themselves aren't correctly rendering with
antialiasing turned on either).
I've received feedback from multiple users seeing this issue as well,
so its not just my machine.
Any ideas? Disabling antialiasing fixes the problem, but I'd like to
be able to get my app to work regardless of whether antialiasing is
enabled/disabled.
- 6
- Any goodhearted person willing to explain me a program in Java I gotHello
What I'll will ask may take some of your time.
I have no experience at all with Java. But I could get my hand on a
programme written in Java, which does exactly what I want.
But I'm eager to learn, and want to know how it does everything.
I'm not interested in the visual aspect but in the communication
What the program does is communicate with a little box, that catches
data from a machine.
In essence it replaces a printer.
The machines prints to a usb port, via a adaptor, the printing data
goes into a little box, and then via a usb connection goes to the
reading pc.
I want to understand that.
Does anyone has some spare time for this (and "teaching skills") ?
I have the jar's and the classes (decompiled also)
For the moment I will not post the sources online.
Many thanks in advance and have a nice day
- 7
- JMF usage question
I've ended up with a situation which positively requires Java, which I
have very little experience with, and am basically trying to have one
or more other controls in a browser applet which uses the java media
player and JMF. I've tried to simply add a TextArea widget next to
the media player in one of the standard examples they provide, but all
that comes up is the media player. I'd appreciate it if anybody could
tell me what I'm doing wrong here:
import java.applet.Applet;
import java.awt.*;
import java.awt.event.*;
import java.lang.String;
import java.net.URL;
import java.net.MalformedURLException;
import java.io.IOException;
import java.util.Properties;
import javax.media.*;
import java.awt.TextArea;
public class SimplePlayerApplet extends Applet implements
ControllerListener {
// media Player
Player player = null;
// component in which video is playing
Component visualComponent = null;
// controls gain, position, start, stop
Component controlComponent = null;
// displays progress during download
Component progressBar = null;
boolean firstTime = true;
long CachingSize = 0L;
Panel panel1 = null;
TextArea textarea1 = null;
int controlPanelHeight = 0;
int videoWidth = 0;
int videoHeight = 0;
public SimplePlayerApplet() {
super();
init();
}
public void init() {
//$ System.out.println("Applet.init() is called");
setLayout(null);
this.setSize(900, 900);
setBackground(Color.white);
panel1 = new Panel();
panel1.setLayout( null );
add(panel1);
panel1.setBounds(0, 0, 350, 350);
textarea1 = new TextArea();
add(textarea1);
textarea1.setBounds(500,0,150,150);
// input file name from html param
String mediaFile = null;
// URL for our media file
MediaLocator mrl = null;
URL url = null;
// Get the media filename info.
// The applet tag should contain the path to the
// source media file, relative to the html page.
if ((mediaFile = getParameter("FILE")) == null)
Fatal("Invalid media file parameter");
try {
url = new URL(getDocumentBase(), mediaFile);
mediaFile = url.toExternalForm();
} catch (MalformedURLException mue) {
}
try {
// Create a media locator from the file name
if ((mrl = new MediaLocator(mediaFile)) == null)
Fatal("Can't build URL for " + mediaFile);
try {
player = Manager.createPlayer(mrl);
} catch (NoPlayerException e) {
System.out.println(e);
Fatal("Could not create player for " + mrl);
}
// Add ourselves as a listener for a player's events
// player.addControllerListener(this);
} catch (MalformedURLException e) {
Fatal("Invalid media file URL!");
} catch (IOException e) {
Fatal("IO exception creating player for " + mrl);
}
}
public void start() {
//$ System.out.println("Applet.start() is called");
// Call start() to prefetch and start the player.
if (player != null) player.start();
}
/**
* Stop media file playback and release resource before
* leaving the page.
*/
public void stop() {
//$ System.out.println("Applet.stop() is called");
if (player != null) {
player.stop();
player.deallocate();
}
}
public void destroy() {
//$ System.out.println("Applet.destroy() is called");
player.close();
}
/**
* This controllerUpdate function must be defined in order to
* implement a ControllerListener interface. This
* function will be called whenever there is a media event
*/
public synchronized void controllerUpdate(ControllerEvent event) {
// If we're getting messages from a dead player,
// just leave
if (player == null)
return;
// When the player is Realized, get the visual
// and control components and add them to the Applet
if (event instanceof RealizeCompleteEvent) {
// if (progressBar != null) {
// panel1.remove(progressBar);
// progressBar = null;
// }
int width = 320;
int height = 0;
if (controlComponent == null)
if (( controlComponent =
player.getControlPanelComponent()) != null) {
controlPanelHeight =
controlComponent.getPreferredSize().height;
panel1.add(controlComponent);
height += controlPanelHeight;
}
if (visualComponent == null)
if (( visualComponent =
player.getVisualComponent())!= null) {
panel1.add(visualComponent);
Dimension videoSize =
visualComponent.getPreferredSize();
videoWidth = videoSize.width;
videoHeight = videoSize.height;
width = videoWidth;
height += videoHeight;
visualComponent.setBounds(0, 0, videoWidth,
videoHeight);
}
panel1.setBounds(0, 0, width, height);
if (controlComponent != null) {
controlComponent.setBounds(0, videoHeight,
width, controlPanelHeight);
controlComponent.invalidate();
}
} else if (event instanceof CachingControlEvent) {
if (player.getState() > Controller.Realizing)
return;
// Put a progress bar up when downloading starts,
// take it down when downloading ends.
CachingControlEvent e = (CachingControlEvent) event;
CachingControl cc = e.getCachingControl();
// Add the bar if not already there ...
if (progressBar == null) {
if ((progressBar = cc.getControlComponent()) != null)
{
panel1.add(progressBar);
panel1.setSize(progressBar.getPreferredSize());
validate();
}
}
} else if (event instanceof EndOfMediaEvent) {
// We've reached the end of the media; rewind and
// start over
player.setMediaTime(new Time(0));
player.start();
} else if (event instanceof ControllerErrorEvent) {
// Tell TypicalPlayerApplet.start() to call it a day
player = null;
Fatal(((ControllerErrorEvent)event).getMessage());
} else if (event instanceof ControllerClosedEvent) {
panel1.removeAll();
}
}
void Fatal (String s) {
// Applications will make various choices about what
// to do here. We print a message
System.err.println("FATAL ERROR: " + s);
throw new Error(s); // Invoke the uncaught exception
// handler System.exit() is another
// choice.
}
}
- 8
- j2meThanks guys
for the help and the spelling lesson ; )
Andrew Thompson wrote:
> Pawel Szulc wrote:
> > Search the Google Maps API forum* for J2ME and mobile.
> > * <http://groups-beta.google.com/group/Google-Maps-API>
> > (it does not look very likely..)
> ....
> > ;)
> >
> > By the way how u spell "plagiarysm" in english?
>
> I generally ask my favorite search engine.
> http://www.google.com/search?q=plagiarysm
>
> "[red]Did you mean:[/red] plagiarism "
>
> (And 'u' is spelt 'you'.)
>
> Andrew T.
- 9
- Another company nuked by M$Getting into bed with M$ is like getting into bed with the ebola virus
or a flesh eating staphlococus infection: sooner or later it is going to
take your business away from you and leave nothing but bones after
eating you alive.
The latest victim finds out the hard way:
http://story.news.yahoo.com/news?tmpl=story&ncid=1209&e=10&u=/ap/20031006/ap_on_hi_te/microsoft_msn_looksmart&sid=95573712
Want to bet replacement gullibles are lined up 'round the block to be
the next bedmate to get what this one got?
xanthian.
--
Posted via Mailgate.ORG Server - http://www.Mailgate.ORG
- 10
- How to set size for JComboBoxHi all,
I am developing an application, which will have two JComboBoxes and
two JTables, and i am using gridbag layout.
when the initial string for JComboBox is small enough then these
sets(JComboBox and JTable) are divided equally, when the initially
string is big then the two sets(JComboBox and JTable) are not divided
equally, how can i divide them equally irrespective of the string
length.
I used the setSize(),setPreferredSize(),and setMaximumSize() for
JComboBox but there is no result ,
Plz help me,
Thanks in advance
dwurity
- 11
- RegEx !compileHi,
I am using Eclipse, Java SDK 1.4 and the java.uitl.regex
I am trying to using regular expressions in my code
I could write something simple like:
String re = "\d";
And I am receiving an invalid escape sequence error.
And I am not so sure why
Aidy
- 12
- Is JAR signing _ever_ harmful?I'm having a series of ructions with our on-site installation people,
re: JAR signing. It's a big app, big budget, and we have lots of
be-suited consultants running around on customer sites for long
periods. I live back in the coder's garret, making the product.
Sometimes they throw me the odd doughnut.
Basically they're reporting every bug and misconfiguration they can
find as being caused by our recent switch to JARs rather than loose
.class files, and in particular by these JARs being signed. It's a
self-generated key, without an X509 cert (at present).
Before I go postal with the +3 Lart-o-doom, can I please ask if there
are _ANY_ circumstances, no matter how perverse, where signing a JAR
could cause something to break? I know of nothing. Nada. Zilch.
One problem we have had was due to signing across two JARs having been
done by different keys. As the real problem here was trying to mix code
from product versions V1 and V2 (a big non-no anyway) then I see this
more as a feature than a bug. But try telling them that...
- 13
- [Eclipse]typing "{"??Eclipse is so kind it places "{" and "}" automatically when I tell it I want
to write down a method but...alt+123 doesn't work if I sipmly want to put a
"{" in the code.
Why?
How can I write down a "{"?
Does it sepends on using cp1252 instead of ascii?
thanks
Fabio
- 14
- Applet Security QuestionI will soon be writing my first applet. While I've done quite a bit of
programming local classes in Java, I have barely done anything but read a
few bits of information on an applet.
This applet will be for my clients to edit their settings, which means when
started the applet needs to know the client's name and password. The page
the applet is started from is on a secure server and only able to be
accessed as a secure page and is reached from the client logging in from
another page.
The only way I know of that I can pass the password on to the applet is by
including it in the web page itself, as a parameter to be passed to the
applet. As I said, the page is secure and can only be reached by logging
in with the password in the first place.
How much of a security risk is it to have the password included as a
parameter for the applet if it is on a secure page as I described? I have
considered encrypting it, but it would have to be light encryption. I know
even light encryption is better than nothing, but how secure is it just to
make sure the page itself can only be accessed with a password and is a
secure page?
Thanks for any help and/or clarification.
Hal
- 15
- JNI - how to manage C++ objects from Java?Hi,
I will soon need to reimplement parts of an existing object model in a
mixture of Java and C++ code. I leafed through "The Java Native
Interface - Programmer's Guide and Specification" but am still not
sure whether JNI can do what I need, especially as regards the
creation and management of C++ objects from Java code (the creation of
Java objects from C++ code, on the other hand, seems to be standard
procedure, at least as far as I could tell from the JNI book...).
What I need to happen on the C++ side is:
- Set up a singleton which starts a native timer thread.
- Listener objects register with the singleton.
- At each timer thread callback, a specific method is called in each
listener.
- At different times in the course of the app's lifecycle, individual
listeners need to be unregistered and destroyed and other listeners
created and registered.
These management tasks are driven by user interaction. Most of the
app, including the UI, is in Java, so I need to find a way to control
the C++ class lifecycles and relationships from Java.
Is this kind of setup possible with JNI? If so, could someone give me
some advice or direct me to reference material on how best to go about
it? If not, does anyone know an alternative?
Any help greatly appreciated,
Martin Maercker
|
|
|