« first day (11 days earlier)      last day (644 days later) » 

AAB
5:52 AM
class Sample{
public static void fun(String str){
str="Good!";
}
public static void main(String []args){
String str="Bad!";
fun(str);
System.out.println(str);
}
}
The code here prints Bad!
class Sample2{
String str="***";
public void fun(Sample2 obj){
obj.str="Good!";
}
public static void main(String []args){
Sample2 A=new Sample2();
Sample2 B=new Sample2();
System.out.println(B.str);
A.fun(B);
System.out.println(B.str);
}
}
 
6:07 AM
@AAB format your code
 
AAB
@ItachiUchiha ok
class Sample{
	public static void fun(String str){
		str="Good!";
	}
	public static void main(String []args){
		String str="Bad!";
		fun(str);
		System.out.println(str);
	}
}
Here`s 2
class Sample2{
	String str="***";
	public void fun(Sample2 obj){
		obj.str="Good!";
	}
	public static void main(String []args){
		Sample2 A=new Sample2();
		Sample2 B=new Sample2();
		System.out.println(B.str);
		A.fun(B);
		System.out.println(B.str);
	}
}
 
6 messages moved from Java
 
 
5 hours later…
11:21 AM
and in my main controller just :
IntroController helpController = new IntroController();
helpController.whichHelpScreen.set("QQ");
FXML = FML?
FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("/View/helpme.fxml")); so this code gotta be in the main controller then
public void openWindow(String whichScreen) throws IOException {

try {
// whichHelpScreen = "dataSelect";
FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("/View/helpme.fxml"));
Parent root = fxmlLoader.load();
stage = new Stage();
stage.initModality(Modality.APPLICATION_MODAL);
stage.setOpacity(1);
stage.setTitle("My New Stage Title");
stage.setScene(new Scene(root));

stage.showAndWait();
} catch (IOException ex) {
Logger.getLogger(IntroController.class.getName()).log(Level.SEVERE, null, ex);
 
FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("/View/IntroFxml.fxml"));
fxmlLoader.load()
IntroController introController = fxmlloader.getController();
introController.setValue("value you need to set")
public void setValue(String value) {
		this.value.set(value);
}
9 mins ago, by ItachiUchiha
StringProperty value = new SimpleStringProperty("abc");

	public String getValue() {
		return value.getValue();
	}

	public void setValue(String value) {
		this.value.set(value);
	}
 
public class IntroController implements Initializable {



StringProperty whichHelpScreen = new SimpleStringProperty();

public String getValue() {
return whichHelpScreen.getValue();
}

public void setValue(String whichHelpScreen) {
this.whichHelpScreen.set(whichHelpScreen);
}
public class MainFXMLController implements Initializable {


FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("/View/helpme.fxml"));
 
public class MainFXMLController implements Initializable {
FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("/View/helpme.fxml"));
 
@FXML
private void btnHelp(ActionEvent event) throws IOException {

Parent root = fxmlLoader.load();
stage = new Stage();
stage.initModality(Modality.APPLICATION_MODAL);
stage.setOpacity(1);
stage.setTitle("My New Stage Title");
stage.setScene(new Scene(root));

stage.showAndWait();
Controller controller = fxmlLoader.getController();
controller.
 
15 messages moved from Java
 
11:37 AM
 @FXML
private void newConnectionButton(ActionEvent event) throws IOException, SQLException {
setVisibleView("tableView");
IntroController helpController = new IntroController();
helpController.whichHelpScreen.set("dataView");
// openDialogWithSQLConnectionInfo();
createTabPaneWithTable("test");
treeViewCombinedColumns.setBackground(new Background(new BackgroundFill(Color.RED, CornerRadii.EMPTY, Insets.EMPTY)));
}
 
1 message moved from Java
 

« first day (11 days earlier)      last day (644 days later) »