Dears..
i try to make a small applet, this applet is about (Dots-lines)game, and i think all of us konw this game.
"Java applet to play the pencil-and-paper game of "Dots and Boxes", also known as "Lines and Boxes".
The game board is a rectangular grid. Dots are shown for the corners of the board squares. Players take turns drawing...
I'm a beginner at Java Programming. I have the experience that I used DX library for before in C++. The DX library worked with simple functions, but the library of the JAVA does not work with functions.
How can I understand Java Class libraries?
...
I was hoping to make a list of some of the differences in terms between java and objective c to abate my confusion. It makes explaining my difficulties easier when I know what things are called.
For example:
null - nil
this - self
map - dictionary (not even quite sure about this one)
What I'm looking for are similar comparisons or c...
Does anyone know of any style checkers or build tools that would flag autoboxing and unboxing from the build server?
I already have the eclipse option to flag it on my end, but not everyone in the project uses the same IDE or same settings. Finding it on the build side seems the only way to detect where it might creep into the project...
Here's an example of what I'd like to be able to do (in Java):
interface MyInterface<E> {
public void doSomething(E foo);
}
class MyClass implements MyInterface<ClassA>, MyInterface<ClassB> {
public void doSomething(ClassA fooA) {
...
}
public void doSomething(ClassB fooB) {
...
}
}
When I try to implement this, th...
Thanks to everyone in advance -
So I went ahead and implemented this code:
http://stackoverflow.com/questions/701681/how-can-i-read-an-httpservletreponses-output-stream
Which gives me the body of the response (html etc), but I am not getting any headers at all - is this possible to do with HttpServletResponseWrapper? I need to capture ...
When I try:
LinkedList<String> stringList = new LinkedList<String>();
I get the following compilation error:
type LinkedList does not take parameters
What am I missing? Can't you do this?
...
Hi,
I want to use the following regular expression which is written within a C# .NET code, in a Java code, but I can't seem to convert it right, can you help me out?
Regex(@"\w+:\/\/(?<Domain>[\x21-\x22\x24-\x2E\x30-\x3A\x40-\x5A\x5F\x61-\x7A]+)(?<Relative>/?\S*)", RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.Singlelin...
when i run my hibernate tools
it reads from the db and create java classes for each tables,
and a java class for composite primary keys.
that's great.
the problem is this line
@Table(name="tst_feature"
,catalog="tstdb"
)
while the table name is required, the "catalog" attribute is not required.
sometimes i want to use "tstdb", so...
I'm the newcomer into java ee,I have studied about core jave,servlet,jsp.
Could anyone give me some suggestion(some books,forums,etc) on how to promote my skills into jave ee?
Thanks a lot in advance.
...
I have a shell that contains a canvas, which in turn draws some text in its PaintListener. The problem is, when I dynamically reduce size of the shell with its setBounds method (this is going to happen every once in a while), the text doesn't get redrawn. In fact, the canvas' PaintListener doesn't get called again.
Is there a way to for...
When I developed a piece of (academic) software using Java, I was forced to use an API that was rather badly implemented. This means that calls to this API for a certain set of input data would sometimes never return. This must have been a bug in the software as the algorithms that it offered were deterministic ones, and sometimes it wou...
Hi,
I want to open the "Ctrl-Shift-T" dialog (find a type) programmatically in eclipse plug-in.
I tried the FilteredItemsSelectionDialog and ResourceListSelectionDialog, but how do I get all the types in the workspace?
Thank you,
Ido.
...
Hi,
When we want deploy Web Application should we use singleton Object or use Static instead of?
what is the bottleneck for use each of them?
I should know about Memory Problem , Concurrency problem and ... .
P.S: what happen for the class that was just readable (should use static or Singleton)
P.S 2: what happen for the class that wa...
Hello, I am implementing some methods which use switch statements to distinguish between different cases:
private void doThis(){
switch(command){
case on: {status = doCalculationsA; break;}
case off: {status = doCalculationsB; break;}
case idle: {status = doCalculationsC; break;}
case stdby:{status = doCalculationsD;...
I want to save some java.awt.Image objects into the disk. But when I try like:
for (Image image : images) {
image = new ImageIcon(image).getImage();
BufferedImage temp = new BufferedImage(image.getWidth(null), image.getHeight(null), BufferedImage.TYPE_INT_RGB);
Graphics2D g = temp.createGraphics();
g.drawImage(image, 0, ...
I am trying to write an SSL client that sends mail using the javax.mail API. The problem I am having is that the server request that I use SSL, but the server is also configured with a non-standard SSL certificate. The web pages I have found say that I need to install the certificate into the trust store. I don't want to do that (I don't...
I store instances of Domain objects in GAE's memcache using the javax.cache API. I'd like to be notified as soon any instance is evicted due to storage limitations or anything else. Is a CacheListener the solution for that? Is GAE calling CacheListener.evict(Object o) when it's removing instance?
...
Hi,
This is my original xml:
<?xml version="1.0" encoding="UTF-8"?>
<table>
<row>
<id>12</id>
<name>Mickey Mouse</name>
</row>
</table>
This is the output after going through encryption/decryption process
<?xml version="1.0" encoding="UTF-8"?>
<table>
<row>
<id>12</id>
<name>Mickey Mouse</name>
</...
I have a lovely little Java client that sends signed email messages. We have an Exchange server that requires username/password authentication to send a message.
When I connect to the exchange server, I get this error:
avax.mail.AuthenticationFailedException: failed to connect
at javax.mail.Service.connect(Service.java:322)
...