Posts by Java • 423 points
19 posts
-
0
votes1
answer121
viewsQ: Positioning
I’m having a hard time adding Abels in different positions, relative to a field (JTextField). I’d like to put one label before the field, the left, and a second label under the JTextField. Example:…
-
2
votes1
answer80
viewsQ: Date Conversion/Formatting Problems
I’m having trouble formatting a date for useful, I need to format a date that this Tue Nov 22 00:00:00 BRST 2017 (example) for date in format dd/MM/yyyy. I’ve been seeing some links, like: How to…
-
0
votes1
answer207
viewsQ: Creating Dynamic Jtextpane component
I had a problem with editing labels, that was solved by using the JTextPane. So, I thought of creating my own component of this type, so that I can pass values "dynamically", and writing a few…
-
2
votes2
answers804
viewsQ: Format Jlabel text with different colors
How could I format with different "properties" a JLabel and its content? For example, I wish I could set a color for my text JLabel, and another to string that this concatenated with it. It is…
-
2
votes1
answer264
viewsQ: Error adding placeholder to a text component
I am implementing the component of this topic together with the following instruction: PromptSupport.setPrompt("Digite..", field); This command is from biblioteca swingx-core-1.6.2 and adds a sort…
-
0
votes1
answer742
viewsQ: Creating component dynamically
I made a method whose goal is to add a number of checkboxes according to the value of a variable that I will receive. I wanted him to stay inside a scrollPane so he wouldn’t take up more space than…
-
0
votes1
answer234
viewsQ: Apply component focus
I have a component that is a JPanel containing two JTextFields, wanted to be able to apply borders and funds only for the JTextFields, without applying on the panel. I treat everything on the main…
-
4
votes1
answer1320
viewsQ: How to change the color of the border?
How I could change the color of the border created by Borderfactory? import java.awt.Dimension; import java.awt.GridBagLayout; import javax.swing.BorderFactory; import javax.swing.JComponent; import…
-
2
votes2
answers1175
viewsQ: How to position the cursor at the beginning of the field?
How can I make a component (JTextField, JFormattedTextField and others) when being clicked/gaining focus, position the cursor in the position 0 component, especially when the component is already…
-
2
votes1
answer455
viewsQ: Modifying a Jslider
I’d like to do two things: first: add a label, or anything, that allows me to put a "text" below the colors. Example in illustration: 2nd: Make the pointer/indicator of the slider, go to the color…
-
0
votes0
answers152
viewsQ: Chart type
I would like to know, if there is any component or library that generates a "graph" similar to this one. I read the documentation from JFreeChart, and there are some kind of graphics, but nothing…
-
4
votes1
answer270
viewsQ: Modifications in Jfreechart
I would like to know, how can I change the colors of the "slices" of the graph and the font where the content and percentage are written. Is it possible? at least the colors. package grafico; import…
-
5
votes1
answer1677
viewsQ: Jdesktoppane background without losing quality and expandable
I have code to add a background image to a JDesktopPaneand it works perfectly on widescreen 16:10 screens. However, when the screen is a little wider (16:9), it does not fill the rest of the…
-
0
votes1
answer813
viewsQ: Comparing dates
My problem is that I am not sure how to compare two dates. I would like to compare a date that the user types, compared to the current date. If the date type is less than the current one, the…
-
1
votes1
answer667
viewsQ: Validate Jdatechooser
I am having trouble determining if the user has filled in a date field of type JDateChooser, would like to do a validation, to know if this empty or not. I tried to do by looking at the…
-
1
votes1
answer94
viewsQ: How to do tabbedPane concealable?
I’m having trouble trying to make a tab (tabbedPane) that is displayed according to the status of a Checkbox ("selected/unchecked"). I do not know if it is possible, since it will end up changing…
-
0
votes1
answer1446
viewsQ: Where does SQL Developer save the BD file?
Where are the banks I create in SQL Developer saved ? I wish I could choose the location/folder to save the Bank, but I don’t know where it is saving.
-
0
votes1
answer3397
viewsQ: how to take a textField value and move to an int variable?
How do I get the value typed in a field of the type JTextField and move on to a variable, so I can do calculations later? I tried to use getText(), but the variables being int, do not receive the…
-
4
votes1
answer258
viewsQ: Assign a function to Jcombobox
I am with the following doubt, I have a combobox, and I want that when you click on one of the combo options, it does something. I wanted to know how I put a variable or method "linked" to combo…