I just tried this code on 1.4.2 and it worked fine... make sure your are setting the defaults before you create the menu stuf...
public class Test {
public static final void main(String[] args) {
Font f = new Font("courier", Font.BOLD, 20);
UIManager.put("Menu.font"...
As with all Swing Components, there are UIManager properties that you can set to change their default look. In your case...
Font f = new Font(...);
UIManager.put("MenuBar.font", f);
UIManager.put("MenuItem.font", f);
...would probably get the job done. Keep in mind that...
Here is some demo code...
import javax.swing.*;
import javax.swing.border.LineBorder;
import java.awt.*;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
/**
* <pre>
* Test
* </pre>
*/
public class Test {
public static void main(String[] args) {
JFrame test = new...
A mouse released event is gauranteed to occur in the same component as the mouse pressed event. It sounds like you are trying to implement some sort of drag and drop function. You may want to think about using the standard dnd ability.
Now... you might be able to cheat by adding a...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.