Skip to content
Advertisement

How to take text input with DialogFragment in Android?

I am trying to get a value that user enters into a Dialog, using the recommended DialogFragment class for it, the Dialog constructs and runs fine, but I cannot return the value of the EditText parameter to the parent class, without get a NullPointerException. My DialogHost class, this constructs, returns and links the parent to its buttons. This is my

Getting id after insert within a transaction (Oracle)

Let’s say I have three tables: team, player, team_player. Table team_player is a bridge table allowing a “many to many” relationship. When someone wants to create a new team, they specify the initial players on that team. How do I insert both the team and team_player rows in the same transaction? That is, I’d like to insert all the team_player

Is there a Java library like Perl 5’s Text::Unidecode?

Perl 5 has a module on CPAN named Text::Unidecode that transliterates Unicode into ASCII. So, for instance, if you hand it the string ““北亰 — it’s the best”” it hands back the string “”Bei Jing — it’s the best””. A quick search for Java libraries to do the same thing only turned up code that would strip Unicode characters or

Let users edit series in JFreeChart XY plots

I’m using JFreeChart to make some graphs in a Java application. I’m trying to figure out how to let the user edit the series paint/stroke. In the Chart Properties window there’s a spot for this, but it just says “No editor implemented”. Is there a way through the API to provide JFreeChart with an editor for these properties, or do

Getting selected item from a JavaFX TableView

How do I get the selected item from a TableView in JavaFX? I am currently using but that does not return me the one selected item in the selection model. Answer Ok, lets say you have a data model class named Person. This way: Note that TableView must take a Person as a type argument to avoid casting: or when

Advertisement