Border « Border « Java Swing Q&A





1. Vista glass border effect in Java Swing/AWT    stackoverflow.com

I'm trying to create an overlay with a Vista Aero Glass -like background in place of a normal window. Part of my answer seems to be here, but I'm wondering ...

2. Swing: How to make non-rectangular windows with soft borders?    stackoverflow.com

How could I make non-rectangular windows with soft borders in Java?
Soft borders (also known as soft clipping) are borders without aliasing artifacts. I searched the web a lot and found several ...

3. borders in java    stackoverflow.com

I want to set single title border to group of textfields how can i do this in java / swing. i have tried below code but text fields are compressing inside panel

// ...

4. Is it possible to have a java swing border only on the top side?    stackoverflow.com

I know how to create borders using BorderFactory but I don't see anything that lets me specify what sides I want the border on :S

5. How do I add a margin outside the border of a component in Swing?    stackoverflow.com

I use multiple components that has a border painted. Is there any easy way to add a margin to the component so that the borders aren't painted so close to eachother? ...

6. java border gui    stackoverflow.com

I am not good with GUIs or User Interfaces in Java. Would a Border or JPanel be good for something like the image below? alt text So, what would be the best ...

7. Swing rotate border (fixed)    stackoverflow.com

i'm working on a swing program to display several pictures. And one can rotate the picture (implemented each as a JComponent). Problem is, when a picture gets rotated, the border of the ...

8. Java Swing JXTaskPane question, how to set bg and border?    stackoverflow.com

I have written the following example code:

import org.jdesktop.swingx.*;
import javax.swing.*;
import java.awt.*;

public class TaskPaneExample{
        public static void main(String[] args)
       ...

9. Leave a Gap between Border and JFrame    stackoverflow.com

I have a JPanel which is set to BorderLayout. I have added 2 JPanels inside this panel, one south and one center. In the center panel, i added a LowerBevelBorder. I ...





10. How can I specify no border on a Java application running on a Mac?    stackoverflow.com

I am working on a project where there is a Java client that needs to run on both Windows and Mac. At the top is a search box, which appears correctly ...

11. JFrame invisible border issue    stackoverflow.com

I´ve a little issue I would like to get solved. On my JFrame there seems to be like an invisible border around the frame. So when something should be invisible or stop ...

12. Borders    coderanch.com

13. Borders    coderanch.com

It would be difficult to replicate all the functionality of the Borders provided by Swing, however, if you only want to implement a few types of Borders it is (relatively) easy, though a bit complicated, since you have to build the specialized components yourself ( basically, you would have to extend Panel to draw the border and hold your object in ...

14. Changing the Border of a Frame/JFrame    coderanch.com

15. Custom Swing Borders    coderanch.com

Hi I'm looking to make a custom border... but only on one side of the rectangle. Basically what I want to do is change the appearance of the line that appears under a JMenuBar... anyone know how? If I set the border of the JMenuBar to Etched (the style I want) it totally encloses the menu bar, I want it only ...

16. Makenon border swing Components    coderanch.com





18. Swing borders    coderanch.com

If you just want a border on the bottom, why not just add a JSeperator under the component. It's not a border, but it looks the same... If you really just have tp use a border, you can make your own... import java.awt.Color; import java.awt.Component; import java.awt.Graphics; import java.awt.Insets; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.border.AbstractBorder; public class BottomBorder extends ...

19. setting of Border on JFrame or JWindow ..: Confusion on Ghraphic    coderanch.com

For the border problem, add the border to the content pane instead of the frame directly. You'll probably have to explicitly cast the content pane to a JComponent to do this. As for the Oval button, you can do this yourself, and there are probably lots of code examples on the web showing lots of different ways to do this... One ...

20. border    coderanch.com

21. Border object with Title    coderanch.com

22. Border on XP table header    coderanch.com

23. get type of border    coderanch.com

24. Need help with "Square must move at constant speed and bounce of the borders"...    coderanch.com

Hi, I please need help with an assignment that I need to do, Here is the assignment: "Write an application that contains a 10 x 10 solid blue square. The square must move at constant speed and must bounce off the borders of the display area. Each time the square collides with a border, its direction must change. Create two classes. ...

26. Calculating coordinates of a point on ellipse border    coderanch.com

I want to connect lines to different points lying on an ellipse's border. Does anyone know how I can calculate the coordinates of the point of intersection between the line going from the center to the corner of the bounding rectangle and the ellipse's border? I mean the 4 points which lie to the north-east, north-west, south-east and south-west of the ...

27. Do not want to use border    coderanch.com

Hi All I am creating few panels within single frame. When I am adding all these panels, they are separated by border. I do not want to show any border to user. User should not be known that things are separated. setBorder(BorderFactory.createEmptyBorder()) does not work. Can any one please help me out. Thanks in advance

28. Border with LestCellRenderer    java-forums.org

If you really want to know, trace the execution of code through JList / BasicListUI / DefaultListCellRenderer and somewhere you'll find that a border is being set that removes the custom border. The only way you can use a custom border (and many other properties) with most renderers is to set it AFTER getting the default properties with a call to ...

29. how can create border    java-forums.org

thank Fubarable, i add radioButtonPanel.setBorder(BorderFactory.createTit leBorder("Actions")); in my code but got error method createTitleBorder(java.lang.String) location: class javax.swing.BorderFactory p2.setBorder(BorderFactory.createTitleBorder("Acti ons")); how can i fix it? this is my code ' JPanel p1=new JPanel(); p1.add( lb1); p1.add( lb2); JPanel p2=new JPanel(); p2.setBorder(BorderFactory.createTitleBorder("Acti ons")); p2.add(rb1); p2.add(rb2); p2.add(rb3); p2.add(rb4); p2.add(rb5); add("Center", p2); JPanel p3=new JPanel(); p3.add(btn1); p3.add(btn2); p3.add(btn3); p1.setLayout(new GridLayout(2,1)); p2.setLayout(new GridLayout(5,1)); setLayout(new BorderLayout()); add(p1,BorderLayout.NORTH); ...

30. changing border colorn of JFrame    java-forums.org

31. Set distance from border to component    java-forums.org

Hello. Is there any way to set a vertical and horizontal distance between the component or container and its border? I know that MatteBorder can do it, but I need to do it with other borders. Is there any way to set that distance, I've looking for it and I didn't find it. Thanks again!