Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!

martin chile

+ Follow
since Jun 24, 2002
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by martin chile

I want to place a JMenuItem instead of inside a JMenu directly in the JMenuBar (in a way it works). Is there a solution for this or do I have to place something else into the JMenuBar that can be used as a sort of Button and does not open a Menu. I can not use a JToolBar.
14 years ago
Please help me me with this, its urgent. (Second attempt)
Under WindowsXP(with XP-Style enabled) buttons are displayed with a 3D-Shade.
So any Swing-Buttons are displayed in 3D-Style even when the backgroundcolor is set manually or the UIManager is handling the Buttoncolor.
How can I change my code to keep the buttons colored, even in XP-Style?
PLEASE, there must be an answer!
16 years ago
Hi guys!
I tested my program under Win XP and encountered a problem which I hope u can solve.
There are a few JButtons which are colorized with JButton.setBackground and UIManager.
When Win XP is displayed in Windows-XP-Style (the new and useless Window-look) it overides the setBackground Method/UIManager; but not in the "good old" classic-style.
Especially the backgroundcolor is replaced by the 3D-Button-effect only colored borders are left.
So maybe someone knows how to get around this without losing my beloved buttonbackgroundcolor.
here is some code to try in windows xp.
UIManager.put("Button.background", new Color(157, 0, 0));
UIManager.put("Button.foreground", new Color(255, 255, 255));
UIManager.put("Button.font", sansserifBold11);
jButton2.setBackground(new Color(157, 0, 0));
16 years ago
Hi all,
i face a ui problem with JFilechooser and UIManager.
I'm able to change the backgroundcolor of the filechooser, but the part with the ComboBox on top of the FIlechooser still has the standard Window-Background-Color. I couldn't find any possibilitys to change it.
any ideas how to change this?
16 years ago
With Toolkit.getDefaultToolkit().getScreenSize() I get the actual ScreenSize.
But I want the ScreenSize WITHOUT the standard MS-TASKBAR (in consideration of taskbar heigth and position on the screen[can be at N/S/W/E of screen]).
Has someone a solution for this without using JNI or has someone a c++ class for that and an instruction how to use it because I havent worked with JNI yet. Any hint would be useful too. Thanks a lot!
16 years ago
if ((String)userNames.elementAt(i)).equals(e.getActionCommand()){
maybe it helps!
yours martin
17 years ago
I want to compare two Files, one of them might be different(just a changed character or a whole paragraph more).
Comparing the length or the last modified date is not working when there are small differences.
Is there a fast way to read the checksum or something like that, so that i don't have to open the documents to look by my own.
Thanks for helping me!
17 years ago
how can i cache class-files (main-class and others), so that the applet is the same for every page on my website. do i just have to open the same class-files in the same directory or are there other ways.
i know how to cache jar-files but dont want to use this before i dont know how to cache class-files.
thanks for your help!
17 years ago
how can i change the text in the browsers statusbar, if it is possible?
the rectangle the applet is loading in (in browsers shortly before applet is running) is usually gray with black info-text.
is there a way to change these colors (in html or java, doesnt matter how) or is this java-standard and not touchable?
thanks for help!
17 years ago
i need to know how i can retrieve the full path the program has been started form.
i'm searching for something like "getmyroot()" so that i can open a file i'm distributing with the program (just "file.txt" is not enough).
thanks for helping,
yours, martin
17 years ago
how can i check if a browser is displaying an applet, so that i can show something else(eg some html text) if not.
thanks for every help!
17 years ago
i want to retrieve the speed the mouse is moving on the screen.
i have tried some time comparisons and devided it through the way the mouse moved during that time, but it didnt satisfy me.
(i want to move some graphics-objects for eg half the time the mouse is passing by.)
has someone experiences with that?
please help me!
17 years ago
i have tried this before, but it doesnt work or im making something completly wrong.
i want to get the degrees of elevation(0 <= a < 360) of a certain point relative to the middle of the screen.
the formula is (sin a = x / r) .x is point.y - panel.getHeight()/2 . r is the distance between the middle and the point.
this is my solution but im not getting a usefully value:
a = 1.0 / Math.sin(Math.toRadians(x)/Math.toRadians(r))
am i on the right way?
or does anyone know a better way to do this?
17 years ago
hi, i need to calculate this term:
a = sin^(-1)(x/r)
sin^(-1) == sec
how do i calculate the invertet sinus or cosinus?
17 years ago