Search:
Type: Posts; User: Totte_ch
Search :
Search took 0.03 seconds.
I want to make an normal image to gray scale. I use a PixelGrabber to get the RGB values.
int[] pixels = new int[w*h];
PixelGrabber pg = new PixelGrabber(img, 0,0, w,h, true);
pg.grabPixels();...
I need to download an image with Java. The URL is...
Sorry, but I really don't understand what you mean
What do you mean by using KeyEvent.VK_UP?
I'm writing a program to control another application. I need to press the keyboard combination: CTRL+SHIFT+DOWN, but the result of the following code is CTRL+DOWN.
Robot robot = new Robot(); //...
Edit: I found the registry key that holds screensaver status
HKEY_CURRENT_USER\Control Panel\Desktop\ScreenSaveActive
But would be much more better with a workaround, if it is possible. Changing...
new java.awt.Robot().getPixelColor(x,y); // returns the color of the pixel at (x,y)
When screensaver is running, this function will return the color of the screensaver that time. Is there any way...
OK, thanks for the tips
I'll have a look at that
I've tried to make it with divs, but that didn't go very well...
I'll make a try with unordered list later today
Hey
I have a problem here. I'm trying to make a menu bar with tables, but the layout isn't the same in all browsers.
You can view the preview page at: http://web.telia.com/~u54602881/navbar.htm...
Hi
I wanted to add a keylistener to my JComboBox.
I know that this doesn't work:
jcombobox.addKeyListener(...);
An I know this should work:
...
Here is one way to do it. (see attached file)
It took a while, but I made it! Some thinking is good for the brain! ;P
Output:
y
^
20 +
|
Hey!
I am trying to make a application, that will request data from my personal server. I want the application to open a socket to my public IP with port number 6789.
String host = ""; // my...
Hey!
This post is quite long, but please read and try to help me. Thanks!
I was trying to make a program that computes a combination to the following problem:
The first possible combination...
Well...
I fixed the problem by extracting the second .jar-file to a directory. Then I packed my File.jar by command:
jar cmvf start.txt File.jar *.class dir
The extra classes i need from...
To create a file:
File file = new File("MyFile.txt");
file.createNewFile();
To get last modified date of file:
Date date = new Date(file.lastModified());
To set last modified date of file:
...
Java har better and easier language, but i think C++ can do much more (for example used for hacking)...
Hey
I have a program (.jar-file) that needs another .jar-file. I compile my File.java by:
javac -cp .;JAR2.jar File.java
...and that works fine. I also pack my classes into a .jar-file:
jar...
I finnaly made my own date chooser, JDateChooser. I just need to translate the labels to work in other contries...
What contries does start the week with sunday?
But how do I create a connection? I've tried with java.net.MulticastSocket:
Computer 1 = 192.168.0.101
Computer 2 = 192.168.0.102
The result I got was "java.net.SocketException: Not a multicast...
P2P = Peer 2 Peer? IM = Instant Messaging? - Right?
Well, I mean a connection between two computers, a connection without a server, so the applications could "talk" by the network. I'm making a...
Many sites uses this to start a download (<head> section):
<meta http-equiv="Refresh" content="0;URL=http://whatever.com/file.zip">
The number in the argument called content sets the seconds to...
<select onchange="javascript:changeStyle(this);">
<option>Style 1</option>
<option>Style 2</option>
<option>Style 3</option>
<option>Style 4</option>
</select>
<script>
function...
Something like this would work:
JLabel myImage = new JLabel(new ImageIcon("someImage.jpg"));
myImage.addMouseListener(new MouseAdapter(){
public void mouseClicked(MouseEvent evt){
...
Hey
I read a book, years ago, about Java. One of the last chapters was about how to create connections and send/reveice messages between a computer and a server.
Now I need to create a...