When in panel2 i type something in the search bar and then i move mouse cursor to panel1 and try to edit a JTextField input for example as in the picture 0.0 nothing happens but the mouse cursor is correctly show up in the JTextField.. What seems to solve the problem is to click anywhere outside of the application window.. but of course this is not a solution !
package name;swing library found in javax called to use the graphical contents.
import javax.swing.*; //creating the contents for the calculator public class calc { JButton btn1= new JButton("1 "); JButton btn2= new JButton("2"); JButton btn3= new JButton("3");
[code]....
I have tried different sizes for the 'TextField' but when I change the size, the position changes instead of the size itself.
How to use the textformater class together with a TextField. I need to filter and format a currency value in a TextField an try it with the text formater, but I'm not really successful at the moment.
I can't recolate and align the button, the circle or the line where i want it to on the canvas. I want to be able to move the line where i want it, now it seems like all objects are stuck in the middle of the scene or canvas.
I have a list of Row objects and want to listen to changes in the name property of a Row object.
public class Row implements Serializable { private final SimpleStringProperty name = new SimpleStringProperty(this, "name", ""); public Row() { this(""); } public Row(String name) { this.name.set(name);
[Code] ....
I would expect to be notified 4 times. Line 23: Added, Line25, 26, 27: Update
But there are only 2 change events. For Line 26 and 27 there is no change event.
I change TreeTableColumn.text but I got a Exception
Exception in thread "JavaFX Application Thread" java.lang.ClassCastException: javafx.scene.control.TreeTableColumn cannot be cast to javafx.scene.control.TableColumn at com.sun.javafx.scene.control.skin.TableHeaderRow$10.invalidated(TableHeaderRow.java:277)
so I check TableHeaderRow . I find this method
private final InvalidationListener columnTextListener = new InvalidationListener() { @Override public void invalidated(Observable observable) { TableColumn<?,?> column = (TableColumn<?,?>) ((StringProperty)observable).getBean(); CheckMenuItem menuItem = columnMenuItems.get(column); if (menuItem != null) { menuItem.setText(getText(column.getText(), column)); } } };
My jar is running from local and when I put it in the network drive, it doesn't run.. shows this error
And it is working if I map my network drive.
Used ant build to generate jar.
this is the error I can see in command prompt jar is at the following location path oNetworkDrive oolsdevMyApp.jar
java.io.FileNotFoundException: path oNetworkDrive oolsdev oNetworkDrive oolsdevMyApp.jar (The system cannot find the file specified) at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.<init>(Unknown Source) at java.util.zip.ZipFile.<init>(Unknown Source) at java.util.jar.JarFile.<init>(Unknown Source) at java.util.jar.JarFile.<init>(Unknown Source) at com.javafx.main.Main.getJarAttributes(Main.java:447) at com.javafx.main.Main.main(Main.java:829)
I observed that the network drive path is duplicating.
We have developed a theme called default.css that is extending of the default caspian.css. What we want to do is offer users the ability to override values from default.css to change colors etc. How can that be done?
I am using javafx 2 in my project,After user change the text in HTMLEditor,i will save the context to database,if text wasn't changed,then i do nothing .so i want to know if the user have changed the text.
I only saw how to add text changed listener to HTML web viewer. So how to add text changed listener to htmleditor?
I have a table column and I want to change the columns header justification from center justified to left justified. How do I do this, either via code or via CSS.
is possibile to change the color of the sorting arrow that appears in the columns of the Table View by css? My attempts have failed and I have not found any documentation, nor is there any reference in the Modena css.
I have noticed a strange behavior of Combobox element. The number of visible rows is not the same established by setVisibleRowCount() method. It happens when changing the items list dynamically. The following example reproduces it. I think it is Javafx 8 bug. I have tried unsuccessfully to trigger some event indirectly to refresh the combobox drop down.
import javafx.application.Application; import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.scene.control.ComboBox; import javafx.scene.layout.HBox; import javafx.stage.Stage; public class TestComboBox extends Application { private int count;
So it seems to reason that many JavaFX applications will want to dynamically change CSS styles. Is the best way to do this via the <node>.getStyleClass().add("classname")? The underlying data structure is an observable list. So lets say one has 5 styles that simply change the fill color of a circle to 5 different colors respectively. So if I have a condition in which I want to dynamically apply 1 of these 5 styles, the way I currently do this is by defining all 5 styles as strings in a list using a static initializer, then I call <node>.getStyleClass().removeAll(list), then getStyleClass().add("classname"). I do this to avoid adding the same style over and over and inflating the underlying list. Is this the correct way to manage dynamic CSS styles?
So I know there is a few different way to implement a splash screen. My app has definitely gotten larger over the last few months of development and I have noticed there is about a 5 second delay between when I run the application to when I see the main stage. I was thinking a splash screen would be nice to fill this time period. I have not had time to prototype using a Preloader and I fear that using an alternate, lightweight stage on startup would still take too long of a delay. I was actually thinking that using the nice and simple JVM argument "-splash:<image name>" would be simple, easy and effective. Unfortunately when I try to do this, the splash screen comes up but never goes away.
I try to bind the text-property of a selected cell of a TreeView to a label. So if the user click on a cell in the treeview the label should show the cell text. Now I am quite confused about the options I got to do so. Should I use label.textProperty().bind( ... ??? ... ) The treeview.onMouseClicked()property? or something different?
I am currently making a video player which allows users to open/play videos which are stored on their computer. I am using JavaFX for this.My problem, is that sometimes when I click the button to load a video, a java.util.ConcurrentModificationException is raised. Other times, it's perfectly fine.I put the calls to .loadAndPlayMediaA() and .prepareMedia() (see below) inside a .runLater(Runnable) to try to prevent this, but it has not worked. My Code (below) is called by a listener on a button, "testButton". I have a class called JfxMediaPlayer which holds the method loadAndPlayMediaA(), and a class called MixingDeck which holds the method prepareMedia()
String sql = "SELECT * FROM user WHERE username =? and password =?" ; pst = conn.prepareStatement(sql); pst.setString(1, username.getText()); pst.setString(2, password.getText()); rs = pst.executeQuery(); if(rs.next()){ do somethig; {
I have 2 textfield that take username and password, on the database thete is a user table
id username password name surname
1 test test test test
people put username and password to the textfield like test test and they logon,but when they write username = TESt and password = teST they can logon too,there is no TESt user on the database or teST password, is the textfield making lowercase all text. or pst.setString(1, username.getText()); is this code changing the text?
I am working on a keypad for a phone app for school. I cannot get the numbers from the keys to show up in the textField. I have made multiple tweaks, but think maybe my case statement is the problem?We did a calculator application in the class, so I have based my code off of that. Although the telephone keypad seemed much simpler to code, I can't seem to get the numbers to show up.
public void actionPerformed(ActionEvent e) { //test for button clicks foundKey = false; //search for clicked key for (int i=0; i<keys.length && !foundKey; i++)
I have 1 textfield and 1 button on a JFrame and having 10 such frames stored in ArrayList al and getting the JFrame instance from traversing the ArrayList at execution time ,So is there a way to access textfield using JFrame instance or i have to name the textfield diffrently 10 times for each frame .
Trying to make a swing box where you can type in string data to the text field and a button. I want the string data to be added to a list everytime you press the addbutton.
How to use validation on a label or textfield in java.
I have a textfield and i want that only username with @ sign will be taken by the program or gives an error.or a textfield that can only take numeric values or whatever the developer wants to take from user..