| DDOS Attacks Coming From www.schestowitz.com |
|
 |
Index ‹ java-programmer
|
- Previous
- 1
- JTable select problemHello,
I have a great problem with my JTable. I have a JTable with few lines
and two columns. The user can select one line and with the following
statements
int column = tblSearchResults.getSelectedColumn();
int row = tblSearchResults.getSelectedRow();
Object value = tblSearchResults.getValueAt(row,column);
I retrieve the value with which I display details of a second line in a
new window (when the user presses a certain button). The problem is
when I close this new window and want to select a new line the
getSelectedColumn and the getSelectedRow returns always -1 which
says that no line is marked although I have marked a line.
Does anybody know what the problem can be? - it must concern the open
and close of the detail window, because when I omit the code line which
opens the detail window and only make System.out.println's with the
getSelectedColumn and getSelectedRow it will always output the right
line...
thx
pat
- 1
- My app runs too slow (lots of code follows)Let me start out by saying that I'm admittedly not a great programmer.
I'm sure that my problems are my own fault and not really Java's. I
have a program that I had originally written in Perl. For various
reasons I decided to rewrite it in Java, but now that I'm nearly done,
I'm not sure if I want to use it because it's very slow and resource
intensive compared to my Perl version.
Quick summary of what the program does: it performs MD5 sums on a
number of files, stores the sums and compares against them on future
runs -- sort of a cheesy tripwire, checks that some processes are
running, checks the contents of a few small files like /etc/passwd,
/etc/shadow, etc. It's strictly a Unix program for me.
My old perl version generally runs the comparisons, checks file
permissions, reads a couple of files, along with reading the last few
minutes of a few logfiles (something I have yet to really implement in
my new Java version, which will make it run even longer, of course) in
less than a second. My java version does it (minus the logfile
reading) in anywhere between 10 and 15 seconds.
Here's my -Xprof output:
Flat profile of 0.74 secs (37 total ticks): process reaper
Thread-local ticks:
100.0% 37 Unknown: no last frame
Flat profile of 0.69 secs (36 total ticks): process reaper
Thread-local ticks:
100.0% 36 Unknown: no last frame
Flat profile of 0.47 secs (24 total ticks): process reaper
Thread-local ticks:
100.0% 24 Unknown: no last frame
Flat profile of 0.79 secs (41 total ticks): process reaper
Thread-local ticks:
100.0% 41 Unknown: no last frame
Flat profile of 10.98 secs (324 total ticks): main
Interpreted + native Method
1.2% 0 + 2 java.io.UnixFileSystem.getBooleanAttributes0
1.2% 0 + 2 java.lang.System.arraycopy
0.6% 1 + 0 java.io.File.getName
0.6% 0 + 1 ssm.FileStat.getOwner
0.6% 0 + 1 java.util.ResourceBundle.<clinit>
0.6% 1 + 0 java.io.BufferedInputStream.fill
0.6% 1 + 0 sun.nio.cs.US_ASCII$Decoder.decodeArrayLoop
0.6% 0 + 1 java.io.FileInputStream.open
5.8% 3 + 7 Total interpreted
Compiled + native Method
34.7% 59 + 1 java.io.ByteArrayOutputStream.write
27.2% 47 + 0 java.io.BufferedInputStream.read
18.5% 32 + 0 sun.security.provider.MD5.transform
1.2% 2 + 0 java.util.Arrays.mergeSort
1.2% 2 + 0 ssm.MD5Sum.loadByteData
0.6% 1 + 0 java.lang.StringBuffer.length
0.6% 1 + 0 ssm.UnixCrypt.D_ENCRYPT
0.6% 1 + 0 java.lang.String.toString
84.4% 145 + 1 Total compiled
Stub + native Method
0.6% 0 + 1 java.lang.System.arraycopy
0.6% 0 + 1 java.io.FileInputStream.readBytes
1.2% 0 + 2 Total stub
Thread-local ticks:
46.6% 151 Blocked (of total)
0.6% 1 Class loader
7.5% 13 Unknown: no last frame
0.6% 1 Unknown: thread_state
Flat profile of 0.00 secs (1 total ticks): Thread-1
Interpreted + native Method
100.0% 1 + 0
java.security.AccessController.getStackAccessControlContext
100.0% 1 + 0 Total interpreted
Global summary of 11.01 seconds:
100.0% 327 Received ticks
0.3% 1 Received GC ticks
0.6% 2 Compilation
0.3% 1 Class loader
46.5% 152 Unknown code
And, because I'm not really sure what to point anyone at, I'll just
attach
the bulk of my code, sorry...
main:=========================================================
import ssm.*;
import java.io.*;
import java.util.*;
import java.net.InetAddress;
import java.text.SimpleDateFormat;
class SystemsSecurityMonitor {
- 4
- JMF Manager.createDataSource() and Resource URLsCurrently I am getting a URL from Class.getResource() for a wav file in
the same directory.
So here is what happens:
If I feed Manager.createDataSource from JMF the Resource URL it fails
and says unable to locate Data Source
If I feed Manager.createDataSource a url to a webserver with the same
file it works fine.
How can I work around this?
Dan
- 5
- Focus problem on JListHello,
I made a JDialog with two JButton and one JList. I'd like to get the focus
on my Jlist, but it's always the first button (in declaration order) which
has the focus. An actionListener is added to the JButton and I put the focus
on the Jlist by "JList.requestFocus()".
Any idea ?
- 8
- Wrong default encoding on Linux - solvedMac <email***@***.com> wrote:
> On Tue, 30 Sep 2003 14:22:46 +0000, Bernd Eggink wrote:
>> I installed j2sdk1.4.2_01 on several Linux systems running SuSE 8.2.
>> Normally the default file encoding is correctly set to "ISO-8859-1".
>> On one system, however, the installation script assigns the value
>> "ANSI_X3.4-1968" to this property, which causes nasty problems with
>> german umlauts. I can't see any essential differences between this
>> system and the others, although I guess there must be some. Any ideas
>> what that could be?
> This may be more of a linux question than a java question. Maybe that one
> machine has different locale settings or something, and the jdk picks up on
> that either during the installation or at run time.
I found it at last. A library was missing (package 'glibc-locale').
Everything is OK now.
Bernd
--
Bernd Eggink
Regionales Rechenzentrum der Uni Hamburg
email***@***.com
http://www.rrz.uni-hamburg.de/RRZ/B.Eggink/
- 8
- Trouble with KeyListeners in 1.4.2I'm having trouble using KeyListeners in 1.4.2. I'm writing a graphics
application, and I'd like to change the behavior of some of the tools when
modifier keys are held down. The problem is that I use a JToolBar, which
seems to have grabbed hold of the focus and won't let go. The KeyListener
I've registered with the main JFrame doesn't pick up any events (unless I
comment out the JToolBar).
I found a fix on the boards at java.sun.com which involves registering a
KeyEventDispatcher with the current KeyboardFocusManager, and that does
allow my KeyListener to work, but any *other* KeyEvents fail to propagate
further--i.e., alt-F4 no longer quits the app, the alt-keys for my menu
mnemonics stop working, etc.
What do I have to do to get both shift-key detection and other key commands
working at the same time? I understand there were some changes to the focus
system in 1.4.x that cause these problems, but there doesn't seem to be any
documentation on how to work around them.
Any help is much appreciated.
BTW, here's the code for the KeyEventDispatcher, in case it helps:
DefaultKeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDisp
atcher(
new KeyEventDispatcher() {
public boolean dispatchKeyEvent(final KeyEvent e) {
processKeyEvent(e);
return true;
} // dispatchKeyEvent
} // KeyEventDispatcher constructor
);
--
Aaron Davies
email***@***.com
- 8
- Measuring string bounds in headless serverI have a problem with calculating screen string width for the browser
client.
I'm outputting a stream of content type application/vnd.ms-excel and
sending back an XML spreadsheet. (No complaints about using Mc$oft
products, it's what's needed!)
Excel does not autosize columns which contain string data, so the text
columns are the standard Excel width, and the text is wrapped onto about
7 lines. See
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnexcl2k2/html/odc_xmlss.asp
for details of the XML format.
Excel does allow you to specify the with of a column in points, so I was
using the awt Font classes to calculate the string bounds in pixels. I
explicitly set the resolution to be used to 72dpi by creating a
FontRenderContext with an AffineTransform with a scaling factor of (1.0,
1.0), so that asking the pixel width, gets the point width.
This worked fine testing it on my windoze machine, but on the Unix
server, it's obviously running in headless mode, and anyway, it doesn't
have the Arial font which I'm specifying in my spreadsheet as the font
to use.
Is there any way of calculating the width of a string in points knowing
its font and the point size of the font? You shouldn't need a graphcs
environment, just the font information. I have all the .TTF files, I
could copy them to the Unix machine if Java could use them and do the
calculation.
I hate leaving the user interface looking so shoddy with wrong sized
columns!
It SHOULD have worked in a headless environment according to
http://java.sun.com/j2se/1.4.2/docs/guide/awt/AWTChanges.html#headless
and we are on version 1.4.2_01. It actually blew up in awt code:
java.lang.NoClassDefFoundError
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:141)
at
java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:62)
at java.awt.Font.initializeFont(Font.java:308)
at java.awt.Font.<init>(Font.java:344)
That's when I'm trying to instantiate a
new Font("Arial", Font.PLAIN, 10);
Any ideas anyone?
- 10
- Cig2u Affiliate Program !cig2u.com - Affiliate Program
Cig2u Affiliate Program! Not only does the site look fantastic, but
they offer competitive prices, and as a cigarette affiliate you will
earn 5% on all sales you make. If you find other people to become
cigarettes affiliates, you will also earn 2% of the total sale value
for all sales they make if they sign up through your affiliate link
Cig2u offer both free and express shipping, with the price of express
shipping being extremely competitive within the industry. Login 24
hours a day to check your sales, traffic, account balance and see how
your banners are performing. You can even test conversion performance
by creating your own custom links! Our program is free to join, it's
easy to sign-up and requires no technical knowledge.
http://affiliates.cigarettes--online.com
- 10
- not getting an error but this code is not working properly.this code is to delete a record from an access database.there is no
error but the record is not getting deleted from database.
please help me in this regard.
thanks in advance.
code:
if(JTCurrentJobTable.getValueAtJTCurrentJobTable.getSelectedRow),JTCurrentJobTable.getSelectedColumn())
!= null){String ObjButtons[] = {"Yes","No"};
int PromptResult = JOptionPane.showOptionDialog(null,"Are you sure you
want to delete the selected record?","Delete
Record",JOptionPane.DEFAULT_OPTION,JOptionPane.ERROR_MESSAGE,null,ObjButtons,ObjButtons[1]);
if(PromptResult==0){stCurrentJob.execute("DELETE * FROM
tblCurrentJob WHERE CurrentJobIndex= " +
JTCurrentJobTable.getValueAt(JTCurrentJobTable.getSelectedRow(),0));
reloadRecord();
JOptionPane.showMessageDialog(null,"Record has been successfully
deleted.","Comfirm Delete",JOptionPane.INFORMATION_MESSAGE);
}
- 11
- JScrollPaneI have a file displayed in a JTextArea which is in a JScrollPane. When the
window appears, the scroll bar is all the way down, displaying the end of
the file. How can I set it to have the JScrollPane scrolled up to display
the beginning of the file?
_______
Nechama Shuchatowitz
email***@***.com
- 12
- Univernsal IDIt seems to me any sort of ID that can be forged for under $500 is
worse than useless. Any serious bad guy can easily afford fake id.
For everyone else it is just a hassle if they forget their id.
In our past anonymity was not a right. Everyone knew everyone in the
village/tribe. You could not easily do wrong without others knowing
it was you.
If we got serious about a Universal ID, what are its characteristics?
1. costs over $1,000,000 to forge.
2. not useful to anyone other than the true owner.
3. can be scanned in under a second.
4. cannot be scanned without permission from the owner.
5. Should not need to be replaced unless lost. Additional photos
could be digitally added as you age.
6. it should be useful as a credit/debit card, id card, door key,
proof of age, link to medical records. It might even capture most of
the information needed to compute your taxes in a way that the
government has to believe you.
7. It would have to be based on encryption technology and digitally
signing information such as DNA, retinal patterns, fingerprints,
photo.
It might be reasonable to design such a card presuming the card will
have the CPU and memory of a laptop running Java.
--
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
- 12
- Can I create a Thread directlyHI,
Can I create a thread directly and then start it and run it as the code below?
Thread tt = new Thread(); (or Thread tt = new Thread("thread");)
tt.start();
tt.run();
If this is not possible, what is the use of these two methods?
- 13
- getting clipboard content as rawdataI am within a java application (swing), and
I would like to get the content of user clipboard as rawdata (binary
byte array) without trying to figure out what flavor it is. I just
need to get the bytes and post them to a server.
(It can part of word doc or xls - server will try to convert that into
an image)
Does that question makes any sens (since I haven't seen a way to do
that within java.awt.datatransfer api) ?
thanks
- 15
- references and a binary treeHello,
I am new to Java. I am filling a binary tree with values using a loop,
so when I need to descend one node deeper at the end of the loop, I
use node=node.right for example. Consider this pseudo code:
//...
while(1) {
node=new Node(new Leaf(),null);
node=node.right;
}
I thought that the node variable will contain reference after this
operation. But it does not, because when I look at the root of the
binary tree, it does not get filled any further after the
node=node.right operation.
So my question is, what actually happens in the node=node.right , I
tought that it should be only copying the references, not the values.
I coded the same in c++ and instead of references I used the pointers
and it worked right as I expected.
- 16
|
| Author |
Message |
satish.singh90

|
Posted: 2007-2-7 8:43:00 |
Top |
java-programmer, DDOS Attacks Coming From www.schestowitz.com
Ever since I visited www.schestowitz.com I have been getting nmaped,
probed, pinged and now DDOS's with floods of requests from an ip
address that resolves to a block assigned to www.schestowitz.com.
I have reported this to my ISP who is now blocking the range from my
trunk.
They in turn have filed a complaint with Catalyst (?) who hosts the
site.
Is anyone else experiencing this kind of a problem or am I the chosen
one?
|
| |
|
| |
 |
Daniel Pitts

|
Posted: 2007-2-7 8:46:00 |
Top |
java-programmer >> DDOS Attacks Coming From www.schestowitz.com
On Feb 6, 4:43 pm, email***@***.com wrote:
> Ever since I visited www.schestowitz.com I have been getting nmaped,
> probed, pinged and now DDOS's with floods of requests from an ip
> address that resolves to a block assigned towww.schestowitz.com.
> I have reported this to my ISP who is now blocking the range from my
> trunk.
> They in turn have filed a complaint with Catalyst (?) who hosts the
> site.
> Is anyone else experiencing this kind of a problem or am I the chosen
> one?
What does this have to do with the newsgroups you have posted to?
|
| |
|
| |
 |
Peter S8O2aGxtYW5u

|
Posted: 2007-2-7 8:48:00 |
Top |
java-programmer >> DDOS Attacks Coming From www.schestowitz.com
email***@***.com wrote:
> Ever since I visited www.schestowitz.com I have been getting nmaped,
> probed, pinged and now DDOS's with floods of requests from an ip
> address that resolves to a block assigned to www.schestowitz.com.
> I have reported this to my ISP who is now blocking the range from my
> trunk.
> They in turn have filed a complaint with Catalyst (?) who hosts the
> site.
> Is anyone else experiencing this kind of a problem or am I the chosen
> one?
Yes, flatfish. You are the chosen one
--
Meddle not in the affairs of Dragons, For thou art crunchy, and good
with ketchup!
|
| |
|
| |
 |
chrisv

|
Posted: 2007-2-7 8:56:00 |
Top |
java-programmer >> DDOS Attacks Coming From www.schestowitz.com
Peter K鰄lmann wrote:
> email***@***.com wrote:
>
>> Ever since I visited www.schestowitz.com I have been getting nmaped,
>> probed, pinged and now DDOS's with floods of requests from an ip
>> address that resolves to a block assigned to www.schestowitz.com.
>> I have reported this to my ISP who is now blocking the range from my
>> trunk.
>> They in turn have filed a complaint with Catalyst (?) who hosts the
>> site.
>> Is anyone else experiencing this kind of a problem or am I the chosen
>> one?
>
> Yes, flatfish. You are the chosen one
Hey idiot, he's not flatfish, I am.
*plonk*
|
| |
|
| |
 |
B Gruff

|
Posted: 2007-2-7 9:07:00 |
Top |
java-programmer >> DDOS Attacks Coming From www.schestowitz.com
On Wednesday 07 February 2007 00:43 email***@***.com wrote:
> Is anyone else experiencing this kind of a problem or am I the chosen
> one?
Yep - a lot of us have a similar problem.
We keep getting postings from some turd in the U.S. of A. who calls himself
satish.singh90 and lots and lots of other names.
What is your ISP doing about it?
|
| |
|
| |
 |
Roy Schestowitz

|
Posted: 2007-2-7 13:21:00 |
Top |
java-programmer >> DDOS Attacks Coming From www.schestowitz.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
__/ [ chrisv ] on Wednesday 07 February 2007 00:55 \__
> Peter K鰄lmann wrote:
>> email***@***.com wrote:
>>
>>> Ever since I visited www.schestowitz.com I have been getting nmaped,
>>> probed, pinged and now DDOS's with floods of requests from an ip
>>> address that resolves to a block assigned to www.schestowitz.com.
>>> I have reported this to my ISP who is now blocking the range from my
>>> trunk.
>>> They in turn have filed a complaint with Catalyst (?) who hosts the
>>> site.
>>> Is anyone else experiencing this kind of a problem or am I the chosen
>>> one?
>>
>> Yes, flatfish. You are the chosen one
>
> Hey idiot, he's not flatfish, I am.
>
> *plonk*
Now Gray Stewart (flatfish+++) wants to harrass my ISP, eh? There was already
one troll whose nym was the full name of an admin of mine. They try to get
/other/ parties upset. Not to mention mass-mailing people whom I know.
The troll's attempts at character assassination are becoming more miserable
(and aggressive) by the day.
- --
~~ Best wishes
Roy S. Schestowitz | "World ends in five minutes - please log out"
http://Schestowitz.com | Free as in Free Beer ? PGP-Key: 0x74572E8E
Cpu(s): 22.6% user, 2.8% system, 0.7% nice, 74.0% idle
http://iuron.com - semantic engine to gather information
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)
iD8DBQFFyWHaU4xAY3RXLo4RAu/LAKCBhl0x1ihj2ScKppqlUKbn5IeiHACfV0Op
jNGd00R44WvwTvuB5yZL6sE=
=9+Vi
-----END PGP SIGNATURE-----
|
| |
|
| |
 |
spike1

|
Posted: 2007-2-7 16:54:00 |
Top |
java-programmer >> DDOS Attacks Coming From www.schestowitz.com
chrisv <email***@***.com> did eloquently scribble:
> Peter K?hlmann wrote:
>> email***@***.com wrote:
>>
>>> Ever since I visited www.schestowitz.com I have been getting nmaped,
>>> probed, pinged and now DDOS's with floods of requests from an ip
>>> address that resolves to a block assigned to www.schestowitz.com.
>>> I have reported this to my ISP who is now blocking the range from my
>>> trunk.
>>> They in turn have filed a complaint with Catalyst (?) who hosts the
>>> site.
>>> Is anyone else experiencing this kind of a problem or am I the chosen
>>> one?
>>
>> Yes, flatfish. You are the chosen one
> Hey idiot, he's not flatfish, I am.
I'm flatfish! AND SO IS MY WIFE!
--
______________________________________________________________________________
| email***@***.com | |
|Andrew Halliwell BSc(hons)| "ARSE! GERLS!! DRINK! DRINK! DRINK!!!" |
| in | "THAT WOULD BE AN ECUMENICAL MATTER!...FECK!!!! |
| Computer Science | - Father Jack in "Father Ted" |
------------------------------------------------------------------------------
|
| |
|
| |
 |
Alex Hunsley

|
Posted: 2007-2-7 17:52:00 |
Top |
java-programmer >> DDOS Attacks Coming From www.schestowitz.com
email***@***.com wrote:
> Ever since I visited www.schestowitz.com I have been getting nmaped,
[snore].
Where does Java come into this? You blaming Java?
|
| |
|
| |
 |
| |
 |
Index ‹ java-programmer |
- Next
- 1
- sun.security.acl questionWhen using the sun.security.adl implementations of acl, aclentry and
permission, is the permission name allowed to have spaces in it? The
examples all use one-word names like "read", "write", etc. I want to
use something like "realtime administrator". Will that work?
d
--
Remove the ns_ from if replying by e-mail (but keep posts in the
newsgroups if possible).
- 2
- Anyone want a copy of JBuilder X Enterprise ?Hi
I'm a programmer and have an extra copy of Borland Enterprise Studio
for Mobile v2.5 and am looking to sell it. I got it at a great price
and am selling it at a great price on eBay (starting today.)
http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&category=46325&item=3691142652
If you're not interested, please let your friends or coworkers know
about it -- the auction ends in 7 days. Only have this one.
If you have any questions please feel free to email me,
Jason
email***@***.com
Network Engineer and Programmer
- 3
- Question about try, catchHow do I make the code go back so that once user type more than 20
characters in the string, it will print a message and then continue to
process more strings?
Here is the code:
//StringTooLongExceptionDriver
import java.util.Scanner;
import java.io.*;
public class StringTooLongExceptionDriver
{
//
// The main method prompts and reads strings. If the string has more
// than 20 characters, it throws a StringTooLongException exception.
//
public static void main(String[] args){
//System.out.println("Enter a string: ");
String strInput = "";
int newStringCounter;
int arrayCounter=0;
char[] myCharArray = new char[20];
InputStreamReader myRead = new InputStreamReader(System.in);
BufferedReader in = new BufferedReader(myRead);
try{
while (!(strInput.equals("DONE"))){
System.out.println("enter your string: ");
int x = 0;
strInput = in.readLine();
newStringCounter = strInput.length();
if (!(strInput.equals("DONE"))){
while (newStringCounter > 0){
myCharArray[arrayCounter] = strInput.charAt(x);
newStringCounter--;
System.out.print("the last char at array is " +
myCharArray[arrayCounter]);
System.out.println(" and array counter is " + arrayCounter);
x++;
arrayCounter++;
}
}
}
if (strInput.equals("DONE")){
System.out.print("you have enterd: ");
for (int i=0; i<=arrayCounter-1; i++){
System.out.print(myCharArray[i]);
}
System.out.println("");
System.out.println("End of the string you have enterd!");
}
}
catch(Exception e){
StringTooLongException error = new StringTooLongException("Total
string character now is larger than 20 characters");
error.EndHere();
}
}
}
class StringTooLongException
{
String statement = "";
public StringTooLongException(String myError){
statement = myError;
System.out.println(statement);
}
public void EndHere(){
System.out.println("please try again");
System.exit(0);
}
}
- 4
- OMLETv4: The Ultimate Oracle Monitoring Software"omlet" <email***@***.com> wrote in message news:<email***@***.com>...
> Dear DBA,
>
> You are cordially invited to test and review our windows native and
> 100% pure Java Oracle 9i/8i Monitoring Application (OMLET). OMLET is
> the Ultimate Visual Real Time Oracle Monitoring Tool. As the
> leading expert in your field, your objective opinion is highly valued
> and your feedback is very appreciated. We would like to encourage you
> to distribute free copies of OMLET to your associates and fellow DBAs.
>
> Omlet can be downloaded from:
>
> http://www.omlet.org/download.html
>
> or any of many mirrors worldwide:
>
> http://www.geocities.com/teraknowledgesystems/download.html
>
> http://www.iboogie.com/search.asp?name_search_type=1&name_lang=50&name_query=omlet+oracle
>
> Thank you for your time, positive feedback.
>
> Cheers,
>
> The OMLET Team
> Tera Knowledge Systems, Inc.
>
> PS. If you feel that this is spam and you read this by mistake, we
> apologize, ignore it and have a nice day.
>
- 5
- Remove "Padding" from GridLayout/ButtonsI have a 10x10 grid of buttons created using a GridLayout. Each button has a
30x30 pixel GIF icon on it.
Unfortunately, nomatter what I try, I can't seem to get each icon to sit
side by side (so that there's no gap between them). Currently there's an
approximately 5 pixel gap between each GIF image.
So far I've tried:
grid_button.setSize(new Dimension(30, 30)); // to set each button to 30x30
_board_panel.setSize(new Dimension(30*y_size, 300*x_size)); // sets grid
board to 30 times the number of grids in each dimension
... but neither seems to work.
How do I get it so that there's no gap between each GIF? I need the size of
each square in the grid to be fixed to exactly 30x30, not relative to the
size of it's holding panel.
TIA.
- 6
- How can I know which button is clicked in JDialog ShowModalHi, all,
In a programme using swing (homework), I use a JDialog window. There are
two buttons on this dialog window. I want to write the program in this way:
// some thing
JDialog d = new ...
...
d.setModal(true);
d.show();
if (d.close = btnOk){
...
} else if (d.close == btnCancel){
...
}
In fact I want to use this way like in the windows programming:
int i = d.showModal();
if (i == ok){
...
} else if ( i == cancel){
...
}
Please help me. I am a newbie in swing programming.
Thanks a lot.
- 7
- JDK1.3.1 AbstractMethodErrorHi Frederick,
> I am trying to use my FreeBSD file server as a build machine as well. So
> I loaded on the JDK1.3.1-p8, JBoss 3.0.2, AntHill-1.6.3.67, Ant 1.5.3-1,
> XDoclet 1.2b3, Hibernate 2.0, etc on my FreeBSD 4.8 stable box. It is a
You did not install these via ports, did you? I can't find a port for
AntHill, but it does look very interesting!
Ernst
_______________________________________________
email***@***.com mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-java
To unsubscribe, send any mail to "email***@***.com"
- 8
- Square rootWhat is the method of finding the square root of a number?
- 9
- What are Good Java books?Hi there,
I'd like to buy one or two Java 2 SE books as
text and reference. I need books with good
examples, exercises, projects and solution.
Yes, I know that there are a lot of good
books in the market, but I don't have time to
compare them.
I already have experience in C and C++
programming and a little bit of Java.
Please reply to the group. Thanks a lot.
Jim
- 10
- 11
- java sockets passing objectsI have a very simple java application in which I need to pass an
object via sockets. It is an object that I have defined, which has
implemented Serializable. The problem occurs when I send an instance
of the object, when I recieve it on the other end, it is null. The
reciever does in fact recieve an object of the correct type (my user
defined object) but it is empty although the one I sent was not. Is
there something I need to do in the readObject() or writeObject()
methods? Any help would be appreciated, thank you!
For reference, here is my user defined object:
class nodeMessage implements Serializable
{
String text;
int messageID;
int senderID;
int recieverID;
String[] stamp;
public nodeMessage(){}
public nodeMessage(String t, int mID, int sID, int rID,
String[] s)
{
text = t;
messageID = mID;
senderID = sID;
recieverID = rID;
stamp = s;
}
public String getText()
{
return text;
}
public int getMID()
{
return messageID;
}
public int getSID()
{
return senderID;
}
public int getRID()
{
return recieverID;
}
public String[] getStamp()
{
return stamp;
}
public void addStamp(String s)
{
stamp[stamp.length] = s;
}
private void writeObject(java.io.ObjectOutputStream out)
throws IOException{
}
private void readObject(java.io.ObjectInputStream in)
throws IOException, ClassNotFoundException{
}
}
- 12
- [UPD] SQLeonardo MMV.III released[http://querybuilder.sourceforge.net]
SQLeonardo is a database query tool written in Java, distributed under
the GNU GENERAL PUBLIC LICENSE.
Include FreeQueryBuilder to create SQL queries without directly writing
SQL. All queries can be saved in a workspace for later use. Works
with any JDBC compliant database(ORACLE,MySQL,HSQLDB,Firebird,DB2)
*** NEW ***
Edit tables directly via the data grid
Regards Nickyb
- 13
- 14
- Tomcat 5.5.7 and Axis 1.0 problemI'm using Tomcat 5.5.7 and deployed Axis 1.0 samples on it. (using JDK
1.5.0_01)
happyaxis.jsp is happy! and finds all required libraries (but not
optionals!)
the list of services is shown correctly (has 2 servies, AdminService
and getVersion)
but when I click on call a local end point the result is:
<?xml version="1.0" encoding="UTF-8" ?>
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Server.userException</faultcode>
<faultstring>java.lang.NullPointerException</faultstring>
<detail />
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
I'm not sure, but I think the problem may be because of the new Compile
mechanism Tomcat 5.5.x uses (depending on JRE not JDK).
How can I recover from this problem?
regards
Amir
- 15
- Thread Contructor QuestionHi All,
I'm curious about something. In a Java certification study guide,
they have the following code and they ask what the result is:
class MyThread extends Thread
{
public static void main(String [] args)
{
MyThread t = new MyThread();
Thread x = new Thread(t);
x.start();
}
public void run()
{
for (int i = 0; i < 3; ++i)
{
System.out.print(i + "..");
}
}
}
It's simple enough. Except, earlier in the text (and in the Java API)
they mention that the only constructors for the Thread class are:
Thread()
Thread(Runnable target)
Thread(Runnable target, String name)
Thread(String name)
Thread(ThreadGroup group, Runnable target)
Thread(ThreadGroup group, Runnable target, String name)
Thread(ThreadGroup group, Runnable target, String name, long
stackSize)
Thread(ThreadGroup group, String name)
I don't see Thread(Thread). And I don't see how it can be a Runnable
except for that they share the same method: run().
|
|
|