Re: JavaFx Problem
Hi there. I could not get this to work using NB 12 and Ant. However, I eventually got it to work with Maven, with a lot of mucking around. :-( Firstly, you had the "create scene" code inside your loops. By moving this outside of ALL loops, as the last thing to execute, it works. :-) I have added the zipped NB 12 project for you to look at. Regards Brad. <> - To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org For additional commands, e-mail: users-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: JavaFx Problem
Thank you for your important information. Anyone who is interested in deep level of learning regarding math or computer science, can use your website as a resource center or library. On Mon, Jul 6, 2020 at 10:22 PM slipbits wrote: > They are all downloadable. If I've done my job correctly, you need not > provide any personal information, email addresses or register for anything. > > No. I did not read all the books. Not even close. But I have read some and > have had some in classes. > > I decided that when I got my website I would populate it with things I > enjoyed or that others that I knew) would enjoy and/or benefit from. So > there you have it. > > art > On 7/6/2020 9:15 AM, Brain Rebooting wrote: > > Just a couple of minutes ago, I just visited your website and saw many > links of various types of books. Among them, I click on mathematics and saw > that, you provided huge amount of books in digital format, and they are > downloadable. Did you read all of those books? > > On Mon, Jul 6, 2020 at 9:58 PM slipbits wrote: > >> Yes. Since I traditionally work on embedded systems, I enjoy reading (and >> rereading) books on algorithms. In the HMI arena, I've focused on Java - a >> big learning curve for me. At various times I reintroduce myself to >> calculus and I always pay some heed to physics https://physicsworld.com/). >> >> >> Since my major interests are in computer science, I read all sorts of >> stuff, including cybersecurity. And then, of course, there is politics, >> economics, investing (algorithms and software) and so on. I have been a >> member of the Association of Computing Machines (ACM) for all of my >> professional life, and I often look at their digital library to find gems >> of wisdom and insight. >> >> If you are interested in looking at some of my interests, take a look at >> my website, https://slipbits.com/. If you have anything you would like >> to see in it then send me some email, and when I get a chance I'll do some >> research. >> >> Learning will last you a lifetime. It will reward you (often) in the >> most unexpected ways. As an example, in 1980 I learned about 'signatures'. >> I've just sent notes to the Association of Old Crows for consideration for >> inclusion in a webimar. The webimar considers a practical application of >> signatures. >> >> art >> On 7/6/2020 8:46 AM, Brain Rebooting wrote: >> >> Thank you. You mean we need to learn various types of things. Not stick >> to one kind of things and take an adapted kind of mindset and thus learn >> always new things. >> >> >> >> On Mon, Jul 6, 2020 at 9:24 PM slipbits wrote: >> >>> Hi; >>> >>> Learning is a lifetime avocation. Once you 'start' to enjoy it, you will >>> always enjoy it. And that's what gets you through the day. >>> >>> I used to say (still do for that matter) that anything that I once >>> learned I will use. Sometimes I will use it years after I 'learned' it. >>> When this happens, its a big 'kick' and tells me that I should have >>> learned more. >>> >>> And this is both in the generic sense and in the pragmatic sense. And, >>> it does last you forever. >>> >>> So, for me, the notion of what to do and how to stay motivated is the >>> process of learning everything. Nothing goes to waste. And need not be >>> specific to one field, or language, or framework, or ... . >>> >>> art >>> >>> On 7/6/2020 8:14 AM, Brain Rebooting wrote: >>> > Wow. Some great things I came to know about you. Especially "always >>> > learning new things" probably take a special kind of mindset. >>> > Otherwise, very fewer people are willing to do that. And you people >>> > are some of those fewer people. >>> > But I'm a little shocked by knowing that, you don't drink coffee now. >>> > Probably in the long term, its negative effect suffer your life. >>> > >>> > Thanks for information about your life. I am trying my best to take >>> > advice from it. >>> > >>> > Greetings. >>> > >>> >>> - >>> To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org >>> For additional commands, e-mail: users-h...@netbeans.apache.org >>> >>> For further information about the NetBeans mailing lists, visit: >>> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists >>> >>>
Re: JavaFx Problem
Hi; Learning is a lifetime avocation. Once you 'start' to enjoy it, you will always enjoy it. And that's what gets you through the day. I used to say (still do for that matter) that anything that I once learned I will use. Sometimes I will use it years after I 'learned' it. When this happens, its a big 'kick' and tells me that I should have learned more. And this is both in the generic sense and in the pragmatic sense. And, it does last you forever. So, for me, the notion of what to do and how to stay motivated is the process of learning everything. Nothing goes to waste. And need not be specific to one field, or language, or framework, or ... . art On 7/6/2020 8:14 AM, Brain Rebooting wrote: Wow. Some great things I came to know about you. Especially "always learning new things" probably take a special kind of mindset. Otherwise, very fewer people are willing to do that. And you people are some of those fewer people. But I'm a little shocked by knowing that, you don't drink coffee now. Probably in the long term, its negative effect suffer your life. Thanks for information about your life. I am trying my best to take advice from it. Greetings. - To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org For additional commands, e-mail: users-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: JavaFx Problem
Wow. Some great things I came to know about you. Especially "always learning new things" probably take a special kind of mindset. Otherwise, very fewer people are willing to do that. And you people are some of those fewer people. But I'm a little shocked by knowing that, you don't drink coffee now. Probably in the long term, its negative effect suffer your life. Thanks for information about your life. I am trying my best to take advice from it. Greetings. On Mon, Jul 6, 2020 at 8:55 PM Laszlo Kishalmi wrote: > > On 7/6/20 7:16 AM, Brain Rebooting wrote: > > I have some questions since last couple of years. Here I want to ask you > now. If it is possible for you, kindly answer my question. > > 1. What motivate or inspires you for working in an open source project, > when you can spend that time too in commercial purpose ? (I supposed that, > because of your higher level of expertise) > > I do DevOps for living, I enjoy doing it as well, though I maybe old > fashioned, but love client side GUI applications. Working on open source as > a hobby balances my life and keeps my developer sharp. > > > 2. What approach did you follow, when learned to code at young age and how > you became so skillful in programming? > > Welll, I just did many silly things at my young age, just to entertain > myself. Text adventure games, music composer, tron like game, mini text > editor, cube rotating, hypertext books, accounting application for my > father, bezier curve displayer, whatever popped up in my mind. > > > 3. Should I need to learn framework or I can survive well if only know > good programming in a popular language? > > You need to learn every day. Once a new framework, less frequently a new > language, patterns, processes, etc. > > > 4. How to stay motivated for long amount of time in learning programming? > > Well, learning programming is fun. There is always something you can try, > create. Do not think big. Just get a little satisfaction with your code > every day. > > > 5. Do you drink coffee and whether it has any negative effect or positive? > > I do not. I have bad experience with that, however I was addicted to > caffeine for a long time, I think, I'm clean now and can have a tee once a > day as well, but on a long term it is not a good thing. > > > 6. Last Question for now is, why IntelliJ IDEA's code completion is > blazing fast? (Don't mind, I have an opportunity for using IntelliJ > IDEA's ultimate edition, but still I love to use NetBeans for its > simplicity, open source nature and some other unknown reason.) > > According to our performance snapshots we are doing a lot of file > operations for code completion which could be slow especially on Windows. > > > On Mon, Jul 6, 2020 at 8:15 PM Brain Rebooting > wrote: > >> Actually I code that scene part, out of outer loop in IntelliJ IDEA >> community edition. That's why it works. Actually I am feeling embarrassed >> to ask for this question now. I should be more careful. By the way, I have >> no tutor or mentor. Whatever I learn, I learned it myself. I learned in >> computer science an online university which is located in the USA. That's >> why I ask you all the time for any type of help. You people are amazing. >> >> On Mon, Jul 6, 2020 at 8:11 PM Geertjan Wielenga >> wrote: >> >>> Please, don’t write to me, write to the mailing list. Start a new thread >>> for each question. >>> >>> Gj >>> >>> On Mon, 6 Jul 2020 at 16:10, Brain Rebooting >>> wrote: >>> I have some questions since last couple of years. Here I want to ask you now. If it is possible for you, kindly answer my question. 1. What motivate or inspires you for working in an open source project, when you can spend that time too in commercial purpose ? (I supposed that, because of your higher level of expertise) 2. What approach did you follow, when learned to code at young age and how you became so skillful in programming? 3. Should I need to learn framework or I can survive well if only know good programming in a popular language? 4. How to stay motivated for long amount of time in learning programming? 5. Do you drink coffee and whether it has any negative effect or positive? 6. Last Question for now is, why IntelliJ IDEA's code completion is blazing fast? (Don't mind, I have an opportunity for using IntelliJ IDEA's ultimate edition, but still I love to use NetBeans for its simplicity, open source nature and some other unknown reason.) On Mon, Jul 6, 2020 at 8:00 PM Brain Rebooting < siumastroma...@gmail.com> wrote: > Actually I code that scene part, out of outer loop in IntelliJ IDEA > community edition. That's why it works. Actually I am feeling embarrassed > to ask for this question now. I should be more careful. By the way, I have > no tutor or mentor. Whatever I learn, I learned it myself. I learned in > computer science an
Re: JavaFx Problem
On 7/6/20 7:16 AM, Brain Rebooting wrote: I have some questions since last couple of years. Here I want to ask you now. If it is possible for you, kindly answer my question. 1. What motivate or inspires you for working in an open source project, when you can spend that time too in commercial purpose ? (I supposed that, because of your higher level of expertise) I do DevOps for living, I enjoy doing it as well, though I maybe old fashioned, but love client side GUI applications. Working on open source as a hobby balances my life and keeps my developer sharp. 2. What approach did you follow, when learned to code at young age and how you became so skillful in programming? Welll, I just did many silly things at my young age, just to entertain myself. Text adventure games, music composer, tron like game, mini text editor, cube rotating, hypertext books, accounting application for my father, bezier curve displayer, whatever popped up in my mind. 3. Should I need to learn framework or I can survive well if only know good programming in a popular language? You need to learn every day. Once a new framework, less frequently a new language, patterns, processes, etc. 4. How to stay motivated for long amount of time in learning programming? Well, learning programming is fun. There is always something you can try, create. Do not think big. Just get a little satisfaction with your code every day. 5. Do you drink coffee and whether it has any negative effect or positive? I do not. I have bad experience with that, however I was addicted to caffeine for a long time, I think, I'm clean now and can have a tee once a day as well, but on a long term it is not a good thing. 6. Last Question for now is, why IntelliJ IDEA's code completion is blazing fast? (Don't mind, I have an opportunity for using IntelliJ IDEA's ultimate edition, but still I love to use NetBeans for its simplicity, open source nature and some other unknown reason.) According to our performance snapshots we are doing a lot of file operations for code completion which could be slow especially on Windows. On Mon, Jul 6, 2020 at 8:15 PM Brain Rebooting mailto:siumastroma...@gmail.com>> wrote: Actually I code that scene part, out of outer loop in IntelliJ IDEA community edition. That's why it works. Actually I am feeling embarrassed to ask for this question now. I should be more careful. By the way, I have no tutor or mentor. Whatever I learn, I learned it myself. I learned in computer science an online university which is located in the USA. That's why I ask you all the time for any type of help. You people are amazing. On Mon, Jul 6, 2020 at 8:11 PM Geertjan Wielenga mailto:geert...@apache.org>> wrote: Please, don’t write to me, write to the mailing list. Start a new thread for each question. Gj On Mon, 6 Jul 2020 at 16:10, Brain Rebooting mailto:siumastroma...@gmail.com>> wrote: I have some questions since last couple of years. Here I want to ask you now. If it is possible for you, kindly answer my question. 1. What motivate or inspires you for working in an open source project, when you can spend that time too in commercial purpose ? (I supposed that, because of your higher level of expertise) 2. What approach did you follow, when learned to code at young age and how you became so skillful in programming? 3. Should I need to learn framework or I can survive well if only know good programming in a popular language? 4. How to stay motivated for long amount of time in learning programming? 5. Do you drink coffee and whether it has any negative effect or positive? 6. Last Question for now is, why IntelliJ IDEA's code completion is blazing fast? (Don't mind, I have an opportunity for using IntelliJ IDEA's ultimate edition, but still I love to use NetBeans for its simplicity, open source nature and some other unknown reason.) On Mon, Jul 6, 2020 at 8:00 PM Brain Rebooting mailto:siumastroma...@gmail.com>> wrote: Actually I code that scene part, out of outer loop in IntelliJ IDEA community edition. That's why it works. Actually I am feeling embarrassed to ask for this question now. I should be more careful. By the way, I have no tutor or mentor. Whatever I learn, I learned it myself. I learned in computer science an online university which is located in the USA. That's why I ask you all the time for any type of help. You people are amazing. On Mon, Jul 6, 2020 at 4:44 PM Geertjan Wielenga
Re: JavaFx Problem
I have some questions since last couple of years. Here I want to ask you now. If it is possible for you, kindly answer my question. 1. What motivate or inspires you for working in an open source project, when you can spend that time too in commercial purpose ? (I supposed that, because of your higher level of expertise) 2. What approach did you follow, when learned to code at young age and how you became so skillful in programming? 3. Should I need to learn framework or I can survive well if only know good programming in a popular language? 4. How to stay motivated for long amount of time in learning programming? 5. Do you drink coffee and whether it has any negative effect or positive? 6. Last Question for now is, why IntelliJ IDEA's code completion is blazing fast? (Don't mind, I have an opportunity for using IntelliJ IDEA's ultimate edition, but still I love to use NetBeans for its simplicity, open source nature and some other unknown reason.) On Mon, Jul 6, 2020 at 8:15 PM Brain Rebooting wrote: > Actually I code that scene part, out of outer loop in IntelliJ IDEA > community edition. That's why it works. Actually I am feeling embarrassed > to ask for this question now. I should be more careful. By the way, I have > no tutor or mentor. Whatever I learn, I learned it myself. I learned in > computer science an online university which is located in the USA. That's > why I ask you all the time for any type of help. You people are amazing. > > On Mon, Jul 6, 2020 at 8:11 PM Geertjan Wielenga > wrote: > >> Please, don’t write to me, write to the mailing list. Start a new thread >> for each question. >> >> Gj >> >> On Mon, 6 Jul 2020 at 16:10, Brain Rebooting >> wrote: >> >>> I have some questions since last couple of years. Here I want to ask you >>> now. If it is possible for you, kindly answer my question. >>> >>> 1. What motivate or inspires you for working in an open source project, >>> when you can spend that time too in commercial purpose ? (I supposed that, >>> because of your higher level of expertise) >>> >>> 2. What approach did you follow, when learned to code at young age and >>> how you became so skillful in programming? >>> >>> 3. Should I need to learn framework or I can survive well if only know >>> good programming in a popular language? >>> >>> 4. How to stay motivated for long amount of time in learning programming? >>> >>> 5. Do you drink coffee and whether it has any negative effect or >>> positive? >>> >>> 6. Last Question for now is, why IntelliJ IDEA's code completion is >>> blazing fast? (Don't mind, I have an opportunity for using IntelliJ >>> IDEA's ultimate edition, but still I love to use NetBeans for its >>> simplicity, open source nature and some other unknown reason.) >>> >>> On Mon, Jul 6, 2020 at 8:00 PM Brain Rebooting >>> wrote: >>> Actually I code that scene part, out of outer loop in IntelliJ IDEA community edition. That's why it works. Actually I am feeling embarrassed to ask for this question now. I should be more careful. By the way, I have no tutor or mentor. Whatever I learn, I learned it myself. I learned in computer science an online university which is located in the USA. That's why I ask you all the time for any type of help. You people are amazing. On Mon, Jul 6, 2020 at 4:44 PM Geertjan Wielenga wrote: > But it works in IntelliJ IDEA community edition? > > Gj > > On Mon, Jul 6, 2020 at 12:27 PM Brain Rebooting < > siumastroma...@gmail.com> wrote: > >> Thank you. Your program works. I made a silly mistake. Create scene >> inside the for loop. >> Take my greetings. >> >> Samiul alom sium >> >> On Mon, Jul 6, 2020 at 3:19 PM Geertjan Wielenga >> wrote: >> >>> This is probably what you want to do: >>> >>> package com.mycompany.mavenproject22; >>> >>> import javafx.application.Application; >>> import javafx.scene.Scene; >>> import javafx.scene.layout.Pane; >>> import javafx.scene.paint.Color; >>> import javafx.stage.Stage; >>> import javafx.scene.shape.Rectangle; >>> >>> /** >>> * JavaFX App >>> */ >>> public class App extends Application { >>> >>> @Override >>> public void start(Stage primaryStage) { >>> >>> double WIDTH = 200; >>> double HEIGHT = 200; >>> >>> // create a pane >>> Pane pane = new Pane(); >>> >>> for (int i = 0; i < 8; i++) { >>> boolean isWhite = i % 2 == 0; >>> for (int j = 0; j < 8; j++) { >>> Rectangle rectangle = new Rectangle(i * WIDTH / 8, >>> j * HEIGHT / 8, WIDTH / 8, HEIGHT / 8); >>> >>> rectangle.setStroke(Color.BLACK); >>> >>> if (isWhite) { >>> rectangle.setFill(Color.WHITE); >>> }
Re: JavaFx Problem
Actually I code that scene part, out of outer loop in IntelliJ IDEA community edition. That's why it works. Actually I am feeling embarrassed to ask for this question now. I should be more careful. By the way, I have no tutor or mentor. Whatever I learn, I learned it myself. I learned in computer science an online university which is located in the USA. That's why I ask you all the time for any type of help. You people are amazing. On Mon, Jul 6, 2020 at 8:11 PM Geertjan Wielenga wrote: > Please, don’t write to me, write to the mailing list. Start a new thread > for each question. > > Gj > > On Mon, 6 Jul 2020 at 16:10, Brain Rebooting > wrote: > >> I have some questions since last couple of years. Here I want to ask you >> now. If it is possible for you, kindly answer my question. >> >> 1. What motivate or inspires you for working in an open source project, >> when you can spend that time too in commercial purpose ? (I supposed that, >> because of your higher level of expertise) >> >> 2. What approach did you follow, when learned to code at young age and >> how you became so skillful in programming? >> >> 3. Should I need to learn framework or I can survive well if only know >> good programming in a popular language? >> >> 4. How to stay motivated for long amount of time in learning programming? >> >> 5. Do you drink coffee and whether it has any negative effect or positive? >> >> 6. Last Question for now is, why IntelliJ IDEA's code completion is >> blazing fast? (Don't mind, I have an opportunity for using IntelliJ >> IDEA's ultimate edition, but still I love to use NetBeans for its >> simplicity, open source nature and some other unknown reason.) >> >> On Mon, Jul 6, 2020 at 8:00 PM Brain Rebooting >> wrote: >> >>> Actually I code that scene part, out of outer loop in IntelliJ IDEA >>> community edition. That's why it works. Actually I am feeling embarrassed >>> to ask for this question now. I should be more careful. By the way, I have >>> no tutor or mentor. Whatever I learn, I learned it myself. I learned in >>> computer science an online university which is located in the USA. That's >>> why I ask you all the time for any type of help. You people are amazing. >>> >>> On Mon, Jul 6, 2020 at 4:44 PM Geertjan Wielenga >>> wrote: >>> But it works in IntelliJ IDEA community edition? Gj On Mon, Jul 6, 2020 at 12:27 PM Brain Rebooting < siumastroma...@gmail.com> wrote: > Thank you. Your program works. I made a silly mistake. Create scene > inside the for loop. > Take my greetings. > > Samiul alom sium > > On Mon, Jul 6, 2020 at 3:19 PM Geertjan Wielenga > wrote: > >> This is probably what you want to do: >> >> package com.mycompany.mavenproject22; >> >> import javafx.application.Application; >> import javafx.scene.Scene; >> import javafx.scene.layout.Pane; >> import javafx.scene.paint.Color; >> import javafx.stage.Stage; >> import javafx.scene.shape.Rectangle; >> >> /** >> * JavaFX App >> */ >> public class App extends Application { >> >> @Override >> public void start(Stage primaryStage) { >> >> double WIDTH = 200; >> double HEIGHT = 200; >> >> // create a pane >> Pane pane = new Pane(); >> >> for (int i = 0; i < 8; i++) { >> boolean isWhite = i % 2 == 0; >> for (int j = 0; j < 8; j++) { >> Rectangle rectangle = new Rectangle(i * WIDTH / 8, >> j * HEIGHT / 8, WIDTH / 8, HEIGHT / 8); >> >> rectangle.setStroke(Color.BLACK); >> >> if (isWhite) { >> rectangle.setFill(Color.WHITE); >> } else { >> rectangle.setFill(Color.BLACK); >> } >> >> isWhite = !isWhite; >> >> pane.getChildren().add(rectangle); >> >> } // end of inner for loop >> } // end of outer for loop >> >> // create scene >> Scene scene = new Scene(pane, WIDTH, HEIGHT); >> primaryStage.setTitle("Display A CheckBoard"); >> primaryStage.setScene(scene); >> primaryStage.show(); >> >> } >> >> public static void main(String[] args) { >> launch(); >> } >> >> } >> >> >> Thanks, >> >> Gj >> >> On Mon, Jul 6, 2020 at 11:10 AM Geertjan Wielenga < >> geert...@apache.org> wrote: >> >>> You're creating a scene at the end of some kind of nested for loop? >>> >>> Gj >>> >>> On Mon, Jul 6, 2020 at 10:54 AM Brain Rebooting < >>> siumastroma...@gmail.com> wrote: >>> OK. Here I am going to submit my simple source code of JavaFX program, that should
Re: JavaFx Problem
But it works in IntelliJ IDEA community edition? Gj On Mon, Jul 6, 2020 at 12:27 PM Brain Rebooting wrote: > Thank you. Your program works. I made a silly mistake. Create scene inside > the for loop. > Take my greetings. > > Samiul alom sium > > On Mon, Jul 6, 2020 at 3:19 PM Geertjan Wielenga > wrote: > >> This is probably what you want to do: >> >> package com.mycompany.mavenproject22; >> >> import javafx.application.Application; >> import javafx.scene.Scene; >> import javafx.scene.layout.Pane; >> import javafx.scene.paint.Color; >> import javafx.stage.Stage; >> import javafx.scene.shape.Rectangle; >> >> /** >> * JavaFX App >> */ >> public class App extends Application { >> >> @Override >> public void start(Stage primaryStage) { >> >> double WIDTH = 200; >> double HEIGHT = 200; >> >> // create a pane >> Pane pane = new Pane(); >> >> for (int i = 0; i < 8; i++) { >> boolean isWhite = i % 2 == 0; >> for (int j = 0; j < 8; j++) { >> Rectangle rectangle = new Rectangle(i * WIDTH / 8, >> j * HEIGHT / 8, WIDTH / 8, HEIGHT / 8); >> >> rectangle.setStroke(Color.BLACK); >> >> if (isWhite) { >> rectangle.setFill(Color.WHITE); >> } else { >> rectangle.setFill(Color.BLACK); >> } >> >> isWhite = !isWhite; >> >> pane.getChildren().add(rectangle); >> >> } // end of inner for loop >> } // end of outer for loop >> >> // create scene >> Scene scene = new Scene(pane, WIDTH, HEIGHT); >> primaryStage.setTitle("Display A CheckBoard"); >> primaryStage.setScene(scene); >> primaryStage.show(); >> >> } >> >> public static void main(String[] args) { >> launch(); >> } >> >> } >> >> >> Thanks, >> >> Gj >> >> On Mon, Jul 6, 2020 at 11:10 AM Geertjan Wielenga >> wrote: >> >>> You're creating a scene at the end of some kind of nested for loop? >>> >>> Gj >>> >>> On Mon, Jul 6, 2020 at 10:54 AM Brain Rebooting < >>> siumastroma...@gmail.com> wrote: >>> OK. Here I am going to submit my simple source code of JavaFX program, that should show a black and white chessboard. import javafx.application.Application; import javafx.scene.Scene; import javafx.scene.layout.Pane; import javafx.scene.paint.Color; import javafx.stage.Stage; import javafx.scene.shape.Rectangle; /** * * @author samiul alom sium * date: 07.07.2020 * * problem: (Game: display a checkerboard) Write a program that displays * a checkerboard in which each white and black cell is a Rectangle * with a fill color black or white. */ public class DisplayACheckBoard extends Application { @Override public void start(Stage primaryStage) { double WIDTH = 200; double HEIGHT = 200; // create a pane Pane pane = new Pane(); for(int i = 0; i < 8; i++){ boolean isWhite = i % 2 == 0; for(int j = 0; j < 8; j++){ Rectangle rectangle = new Rectangle(i * WIDTH / 8, j * HEIGHT / 8, WIDTH / 8, HEIGHT / 8); rectangle.setStroke(Color.BLACK); if(isWhite){ rectangle.setFill(Color.WHITE); } else { rectangle.setFill(Color.BLACK); } isWhite = !isWhite; pane.getChildren().add(rectangle); // create scene Scene scene = new Scene(pane, WIDTH, HEIGHT); primaryStage.setTitle("Display A CheckBoard"); primaryStage.setScene(scene); primaryStage.show(); } // end of inner for loop } // end of outer for loop } public static void main(String[] args) { launch(args); -- Here I used: JDK: amazon corretto 1.8.0 252 OS: Ubuntu 18.04.4 LTS IDE: Apache NetBeans 12 Build Tool: Ant // Extra info: Even netbeans-12 error detector didn't show any error on the above code. Problem arises when I am going to run the code. I try to clean and build projects and then run the projects, but still same results come in. But the
Re: JavaFx Problem
Thank you. Your program works. I made a silly mistake. Create scene inside the for loop. Take my greetings. Samiul alom sium On Mon, Jul 6, 2020 at 3:19 PM Geertjan Wielenga wrote: > This is probably what you want to do: > > package com.mycompany.mavenproject22; > > import javafx.application.Application; > import javafx.scene.Scene; > import javafx.scene.layout.Pane; > import javafx.scene.paint.Color; > import javafx.stage.Stage; > import javafx.scene.shape.Rectangle; > > /** > * JavaFX App > */ > public class App extends Application { > > @Override > public void start(Stage primaryStage) { > > double WIDTH = 200; > double HEIGHT = 200; > > // create a pane > Pane pane = new Pane(); > > for (int i = 0; i < 8; i++) { > boolean isWhite = i % 2 == 0; > for (int j = 0; j < 8; j++) { > Rectangle rectangle = new Rectangle(i * WIDTH / 8, > j * HEIGHT / 8, WIDTH / 8, HEIGHT / 8); > > rectangle.setStroke(Color.BLACK); > > if (isWhite) { > rectangle.setFill(Color.WHITE); > } else { > rectangle.setFill(Color.BLACK); > } > > isWhite = !isWhite; > > pane.getChildren().add(rectangle); > > } // end of inner for loop > } // end of outer for loop > > // create scene > Scene scene = new Scene(pane, WIDTH, HEIGHT); > primaryStage.setTitle("Display A CheckBoard"); > primaryStage.setScene(scene); > primaryStage.show(); > > } > > public static void main(String[] args) { > launch(); > } > > } > > > Thanks, > > Gj > > On Mon, Jul 6, 2020 at 11:10 AM Geertjan Wielenga > wrote: > >> You're creating a scene at the end of some kind of nested for loop? >> >> Gj >> >> On Mon, Jul 6, 2020 at 10:54 AM Brain Rebooting >> wrote: >> >>> OK. Here I am going to submit my simple source code of JavaFX program, >>> that should show a black and white chessboard. >>> >>> >>> >>> >>> >>> import javafx.application.Application; >>> import javafx.scene.Scene; >>> import javafx.scene.layout.Pane; >>> import javafx.scene.paint.Color; >>> import javafx.stage.Stage; >>> import javafx.scene.shape.Rectangle; >>> >>> /** >>> * >>> * @author samiul alom sium >>> * date: 07.07.2020 >>> * >>> * problem: (Game: display a checkerboard) Write a program that displays >>> * a checkerboard in which each white and black cell is a Rectangle >>> * with a fill color black or white. >>> */ >>> >>> public class DisplayACheckBoard extends Application { >>> >>> @Override >>> public void start(Stage primaryStage) { >>> >>> double WIDTH = 200; >>> double HEIGHT = 200; >>> >>> // create a pane >>> Pane pane = new Pane(); >>> >>> for(int i = 0; i < 8; i++){ >>> boolean isWhite = i % 2 == 0; >>> for(int j = 0; j < 8; j++){ >>> Rectangle rectangle = new Rectangle(i * WIDTH / 8, >>> j * HEIGHT / 8, WIDTH / 8, HEIGHT / 8); >>> >>> rectangle.setStroke(Color.BLACK); >>> >>> if(isWhite){ >>> rectangle.setFill(Color.WHITE); >>> } >>> else { >>> rectangle.setFill(Color.BLACK); >>> } >>> >>> isWhite = !isWhite; >>> >>> pane.getChildren().add(rectangle); >>> >>> // create scene >>> Scene scene = new Scene(pane, WIDTH, HEIGHT); >>> primaryStage.setTitle("Display A CheckBoard"); >>> primaryStage.setScene(scene); >>> primaryStage.show(); >>> >>> } // end of inner for loop >>> } // end of outer for loop >>> >>> } >>> >>> public static void main(String[] args) { >>> launch(args); >>> >>> >>> -- >>> >>> Here I used: >>> >>> JDK: amazon corretto 1.8.0 252 >>> OS: Ubuntu 18.04.4 LTS >>> IDE: Apache NetBeans 12 >>> Build Tool: Ant >>> >>> // >>> Extra info: >>> Even netbeans-12 error detector didn't show any error on the above code. >>> Problem arises when I am going to run the code. I try to clean and build >>> projects and then run the projects, but still same results come in. But the >>> strange thing is, this same source code works in IntelliJ IDEA community >>> edition with same compiler. Even I can't remember I could see any GUI >>> result of my JavaFX program in NB-12, but I could do that well in NB-11.3 >>> // >>> >>> On Mon, Jul 6, 2020 at 2:52 PM Brain Rebooting >>> wrote: >>> OK.
Re: JavaFx Problem
This is probably what you want to do: package com.mycompany.mavenproject22; import javafx.application.Application; import javafx.scene.Scene; import javafx.scene.layout.Pane; import javafx.scene.paint.Color; import javafx.stage.Stage; import javafx.scene.shape.Rectangle; /** * JavaFX App */ public class App extends Application { @Override public void start(Stage primaryStage) { double WIDTH = 200; double HEIGHT = 200; // create a pane Pane pane = new Pane(); for (int i = 0; i < 8; i++) { boolean isWhite = i % 2 == 0; for (int j = 0; j < 8; j++) { Rectangle rectangle = new Rectangle(i * WIDTH / 8, j * HEIGHT / 8, WIDTH / 8, HEIGHT / 8); rectangle.setStroke(Color.BLACK); if (isWhite) { rectangle.setFill(Color.WHITE); } else { rectangle.setFill(Color.BLACK); } isWhite = !isWhite; pane.getChildren().add(rectangle); } // end of inner for loop } // end of outer for loop // create scene Scene scene = new Scene(pane, WIDTH, HEIGHT); primaryStage.setTitle("Display A CheckBoard"); primaryStage.setScene(scene); primaryStage.show(); } public static void main(String[] args) { launch(); } } Thanks, Gj On Mon, Jul 6, 2020 at 11:10 AM Geertjan Wielenga wrote: > You're creating a scene at the end of some kind of nested for loop? > > Gj > > On Mon, Jul 6, 2020 at 10:54 AM Brain Rebooting > wrote: > >> OK. Here I am going to submit my simple source code of JavaFX program, >> that should show a black and white chessboard. >> >> >> >> >> >> import javafx.application.Application; >> import javafx.scene.Scene; >> import javafx.scene.layout.Pane; >> import javafx.scene.paint.Color; >> import javafx.stage.Stage; >> import javafx.scene.shape.Rectangle; >> >> /** >> * >> * @author samiul alom sium >> * date: 07.07.2020 >> * >> * problem: (Game: display a checkerboard) Write a program that displays >> * a checkerboard in which each white and black cell is a Rectangle >> * with a fill color black or white. >> */ >> >> public class DisplayACheckBoard extends Application { >> >> @Override >> public void start(Stage primaryStage) { >> >> double WIDTH = 200; >> double HEIGHT = 200; >> >> // create a pane >> Pane pane = new Pane(); >> >> for(int i = 0; i < 8; i++){ >> boolean isWhite = i % 2 == 0; >> for(int j = 0; j < 8; j++){ >> Rectangle rectangle = new Rectangle(i * WIDTH / 8, >> j * HEIGHT / 8, WIDTH / 8, HEIGHT / 8); >> >> rectangle.setStroke(Color.BLACK); >> >> if(isWhite){ >> rectangle.setFill(Color.WHITE); >> } >> else { >> rectangle.setFill(Color.BLACK); >> } >> >> isWhite = !isWhite; >> >> pane.getChildren().add(rectangle); >> >> // create scene >> Scene scene = new Scene(pane, WIDTH, HEIGHT); >> primaryStage.setTitle("Display A CheckBoard"); >> primaryStage.setScene(scene); >> primaryStage.show(); >> >> } // end of inner for loop >> } // end of outer for loop >> >> } >> >> public static void main(String[] args) { >> launch(args); >> >> >> -- >> >> Here I used: >> >> JDK: amazon corretto 1.8.0 252 >> OS: Ubuntu 18.04.4 LTS >> IDE: Apache NetBeans 12 >> Build Tool: Ant >> >> // >> Extra info: >> Even netbeans-12 error detector didn't show any error on the above code. >> Problem arises when I am going to run the code. I try to clean and build >> projects and then run the projects, but still same results come in. But the >> strange thing is, this same source code works in IntelliJ IDEA community >> edition with same compiler. Even I can't remember I could see any GUI >> result of my JavaFX program in NB-12, but I could do that well in NB-11.3 >> // >> >> On Mon, Jul 6, 2020 at 2:52 PM Brain Rebooting >> wrote: >> >>> OK. Here I am going to submit my simple source code of JavaFX program, >>> that should show a black and white chessboard. >>> >>> >>> >>> >>> >>> import javafx.application.Application; >>> import javafx.scene.Scene; >>> import javafx.scene.layout.Pane; >>>
Re: JavaFx Problem
You're creating a scene at the end of some kind of nested for loop? Gj On Mon, Jul 6, 2020 at 10:54 AM Brain Rebooting wrote: > OK. Here I am going to submit my simple source code of JavaFX program, > that should show a black and white chessboard. > > > > > > import javafx.application.Application; > import javafx.scene.Scene; > import javafx.scene.layout.Pane; > import javafx.scene.paint.Color; > import javafx.stage.Stage; > import javafx.scene.shape.Rectangle; > > /** > * > * @author samiul alom sium > * date: 07.07.2020 > * > * problem: (Game: display a checkerboard) Write a program that displays > * a checkerboard in which each white and black cell is a Rectangle > * with a fill color black or white. > */ > > public class DisplayACheckBoard extends Application { > > @Override > public void start(Stage primaryStage) { > > double WIDTH = 200; > double HEIGHT = 200; > > // create a pane > Pane pane = new Pane(); > > for(int i = 0; i < 8; i++){ > boolean isWhite = i % 2 == 0; > for(int j = 0; j < 8; j++){ > Rectangle rectangle = new Rectangle(i * WIDTH / 8, > j * HEIGHT / 8, WIDTH / 8, HEIGHT / 8); > > rectangle.setStroke(Color.BLACK); > > if(isWhite){ > rectangle.setFill(Color.WHITE); > } > else { > rectangle.setFill(Color.BLACK); > } > > isWhite = !isWhite; > > pane.getChildren().add(rectangle); > > // create scene > Scene scene = new Scene(pane, WIDTH, HEIGHT); > primaryStage.setTitle("Display A CheckBoard"); > primaryStage.setScene(scene); > primaryStage.show(); > > } // end of inner for loop > } // end of outer for loop > > } > > public static void main(String[] args) { > launch(args); > > > -- > > Here I used: > > JDK: amazon corretto 1.8.0 252 > OS: Ubuntu 18.04.4 LTS > IDE: Apache NetBeans 12 > Build Tool: Ant > > // > Extra info: > Even netbeans-12 error detector didn't show any error on the above code. > Problem arises when I am going to run the code. I try to clean and build > projects and then run the projects, but still same results come in. But the > strange thing is, this same source code works in IntelliJ IDEA community > edition with same compiler. Even I can't remember I could see any GUI > result of my JavaFX program in NB-12, but I could do that well in NB-11.3 > // > > On Mon, Jul 6, 2020 at 2:52 PM Brain Rebooting > wrote: > >> OK. Here I am going to submit my simple source code of JavaFX program, >> that should show a black and white chessboard. >> >> >> >> >> >> import javafx.application.Application; >> import javafx.scene.Scene; >> import javafx.scene.layout.Pane; >> import javafx.scene.paint.Color; >> import javafx.stage.Stage; >> import javafx.scene.shape.Rectangle; >> >> /** >> * >> * @author samiul alom sium >> * date: 07.07.2020 >> * >> * problem: (Game: display a checkerboard) Write a program that displays >> * a checkerboard in which each white and black cell is a Rectangle >> * with a fill color black or white. >> */ >> >> public class DisplayACheckBoard extends Application { >> >> @Override >> public void start(Stage primaryStage) { >> >> double WIDTH = 200; >> double HEIGHT = 200; >> >> // create a pane >> Pane pane = new Pane(); >> >> for(int i = 0; i < 8; i++){ >> boolean isWhite = i % 2 == 0; >> for(int j = 0; j < 8; j++){ >> Rectangle rectangle = new Rectangle(i * WIDTH / 8, >> j * HEIGHT / 8, WIDTH / 8, HEIGHT / 8); >> >> rectangle.setStroke(Color.BLACK); >> >> if(isWhite){ >> rectangle.setFill(Color.WHITE); >> } >> else { >> rectangle.setFill(Color.BLACK); >> } >> >> isWhite = !isWhite; >> >> pane.getChildren().add(rectangle); >> >> // create scene >> Scene scene = new Scene(pane, WIDTH, HEIGHT); >> primaryStage.setTitle("Display A CheckBoard"); >> primaryStage.setScene(scene); >> primaryStage.show(); >> >> } // end of inner for loop >> } // end of outer for loop >> >> } >> >>
Re: JavaFx Problem
OK. Here I am going to submit my simple source code of JavaFX program, that should show a black and white chessboard. import javafx.application.Application; import javafx.scene.Scene; import javafx.scene.layout.Pane; import javafx.scene.paint.Color; import javafx.stage.Stage; import javafx.scene.shape.Rectangle; /** * * @author samiul alom sium * date: 07.07.2020 * * problem: (Game: display a checkerboard) Write a program that displays * a checkerboard in which each white and black cell is a Rectangle * with a fill color black or white. */ public class DisplayACheckBoard extends Application { @Override public void start(Stage primaryStage) { double WIDTH = 200; double HEIGHT = 200; // create a pane Pane pane = new Pane(); for(int i = 0; i < 8; i++){ boolean isWhite = i % 2 == 0; for(int j = 0; j < 8; j++){ Rectangle rectangle = new Rectangle(i * WIDTH / 8, j * HEIGHT / 8, WIDTH / 8, HEIGHT / 8); rectangle.setStroke(Color.BLACK); if(isWhite){ rectangle.setFill(Color.WHITE); } else { rectangle.setFill(Color.BLACK); } isWhite = !isWhite; pane.getChildren().add(rectangle); // create scene Scene scene = new Scene(pane, WIDTH, HEIGHT); primaryStage.setTitle("Display A CheckBoard"); primaryStage.setScene(scene); primaryStage.show(); } // end of inner for loop } // end of outer for loop } public static void main(String[] args) { launch(args); -- Here I used: JDK: amazon corretto 1.8.0 252 OS: Ubuntu 18.04.4 LTS IDE: Apache NetBeans 12 Build Tool: Ant // Extra info: Even netbeans-12 error detector didn't show any error on the above code. Problem arises when I am going to run the code. I try to clean and build projects and then run the projects, but still same results come in. But the strange thing is, this same source code works in IntelliJ IDEA community edition with same compiler. Even I can't remember I could see any GUI result of my JavaFX program in NB-12, but I could do that well in NB-11.3 // On Mon, Jul 6, 2020 at 2:52 PM Brain Rebooting wrote: > OK. Here I am going to submit my simple source code of JavaFX program, > that should show a black and white chessboard. > > > > > > import javafx.application.Application; > import javafx.scene.Scene; > import javafx.scene.layout.Pane; > import javafx.scene.paint.Color; > import javafx.stage.Stage; > import javafx.scene.shape.Rectangle; > > /** > * > * @author samiul alom sium > * date: 07.07.2020 > * > * problem: (Game: display a checkerboard) Write a program that displays > * a checkerboard in which each white and black cell is a Rectangle > * with a fill color black or white. > */ > > public class DisplayACheckBoard extends Application { > > @Override > public void start(Stage primaryStage) { > > double WIDTH = 200; > double HEIGHT = 200; > > // create a pane > Pane pane = new Pane(); > > for(int i = 0; i < 8; i++){ > boolean isWhite = i % 2 == 0; > for(int j = 0; j < 8; j++){ > Rectangle rectangle = new Rectangle(i * WIDTH / 8, > j * HEIGHT / 8, WIDTH / 8, HEIGHT / 8); > > rectangle.setStroke(Color.BLACK); > > if(isWhite){ > rectangle.setFill(Color.WHITE); > } > else { > rectangle.setFill(Color.BLACK); > } > > isWhite = !isWhite; > > pane.getChildren().add(rectangle); > > // create scene > Scene scene = new Scene(pane, WIDTH, HEIGHT); > primaryStage.setTitle("Display A CheckBoard"); > primaryStage.setScene(scene); > primaryStage.show(); > > } // end of inner for loop > } // end of outer for loop > > } > > public static void main(String[] args) { > launch(args); > > > -- > > Here I used: > > JDK: amazon corretto 1.8.0 252 > OS: Ubuntu 18.04.4 LTS > IDE: Apache NetBeans 12 > Build Tool: Ant > > // >
Re: JavaFx Problem
Can you provide any info so someone can reproduce the problem? Gj On Mon, 6 Jul 2020 at 08:02, Brain Rebooting wrote: > Probably not only this specific program. After installing NetBeans 12, > none of my JavaFX program show output (with ant build). But NetBeans 11.3 > with all same configuration, did output my JavaFX program. > > On Mon, Jul 6, 2020 at 11:47 AM Brain Rebooting > wrote: > >> >> Problems started from this line on the console: >> >> Exception in Application start method >> >> But when I run the same program in IntelliJ IDEA community edition, it >> just works and literally I don't see any error on my own source code. >> Apache NetBeans error detector don't show any error on my source code. But >> still when I try to execute it, these errors are displaying on the console. >> >> On Mon, Jul 6, 2020 at 11:43 AM Emilian Bold >> wrote: >> >>> Please send email to the mailing list (reply all) not just to me. >>> >>> --emi >>> >>> lun., 6 iul. 2020, 08:34 Brain Rebooting a >>> scris: >>> Problems started from this line on the console: Exception in Application start method But when I run the same program in IntelliJ IDEA community edition, it just works and literally I don't see any error on my own source code. Apache NetBeans error detector don't show any error on my source code. But still when I try to execute it, these errors are displaying on the console. On Mon, Jul 6, 2020 at 11:30 AM Emilian Bold wrote: > Start by telling us which errors you see. > > --emi > > lun., 6 iul. 2020, 08:04 Brain Rebooting a > scris: > >> Why Apache NetBeans 12 don't execute my JavaFX program? I run the >> same to same program in IntelliJ IDEA community edition and it works. But >> NetBeans shows there are some errors. Here is my software usage: >> >> Apache NetBeans 12 >> Ubuntu 18 >> JDK 8 >> >> >> Samiul alom sium >> Bangladesh >> >
Re: JavaFx Problem
Probably not only this specific program. After installing NetBeans 12, none of my JavaFX program show output (with ant build). But NetBeans 11.3 with all same configuration, did output my JavaFX program. On Mon, Jul 6, 2020 at 11:47 AM Brain Rebooting wrote: > > Problems started from this line on the console: > > Exception in Application start method > > But when I run the same program in IntelliJ IDEA community edition, it > just works and literally I don't see any error on my own source code. > Apache NetBeans error detector don't show any error on my source code. But > still when I try to execute it, these errors are displaying on the console. > > On Mon, Jul 6, 2020 at 11:43 AM Emilian Bold > wrote: > >> Please send email to the mailing list (reply all) not just to me. >> >> --emi >> >> lun., 6 iul. 2020, 08:34 Brain Rebooting a >> scris: >> >>> Problems started from this line on the console: >>> >>> Exception in Application start method >>> >>> But when I run the same program in IntelliJ IDEA community edition, it >>> just works and literally I don't see any error on my own source code. >>> Apache NetBeans error detector don't show any error on my source code. But >>> still when I try to execute it, these errors are displaying on the console. >>> >>> On Mon, Jul 6, 2020 at 11:30 AM Emilian Bold >>> wrote: >>> Start by telling us which errors you see. --emi lun., 6 iul. 2020, 08:04 Brain Rebooting a scris: > Why Apache NetBeans 12 don't execute my JavaFX program? I run the same > to same program in IntelliJ IDEA community edition and it works. But > NetBeans shows there are some errors. Here is my software usage: > > Apache NetBeans 12 > Ubuntu 18 > JDK 8 > > > Samiul alom sium > Bangladesh >
Re: JavaFx Problem
Problems started from this line on the console: Exception in Application start method But when I run the same program in IntelliJ IDEA community edition, it just works and literally I don't see any error on my own source code. Apache NetBeans error detector don't show any error on my source code. But still when I try to execute it, these errors are displaying on the console. On Mon, Jul 6, 2020 at 11:43 AM Emilian Bold wrote: > Please send email to the mailing list (reply all) not just to me. > > --emi > > lun., 6 iul. 2020, 08:34 Brain Rebooting a > scris: > >> Problems started from this line on the console: >> >> Exception in Application start method >> >> But when I run the same program in IntelliJ IDEA community edition, it >> just works and literally I don't see any error on my own source code. >> Apache NetBeans error detector don't show any error on my source code. But >> still when I try to execute it, these errors are displaying on the console. >> >> On Mon, Jul 6, 2020 at 11:30 AM Emilian Bold >> wrote: >> >>> Start by telling us which errors you see. >>> >>> --emi >>> >>> lun., 6 iul. 2020, 08:04 Brain Rebooting a >>> scris: >>> Why Apache NetBeans 12 don't execute my JavaFX program? I run the same to same program in IntelliJ IDEA community edition and it works. But NetBeans shows there are some errors. Here is my software usage: Apache NetBeans 12 Ubuntu 18 JDK 8 Samiul alom sium Bangladesh >>>
Re: JavaFx Problem
Start by telling us which errors you see. --emi lun., 6 iul. 2020, 08:04 Brain Rebooting a scris: > Why Apache NetBeans 12 don't execute my JavaFX program? I run the same to > same program in IntelliJ IDEA community edition and it works. But NetBeans > shows there are some errors. Here is my software usage: > > Apache NetBeans 12 > Ubuntu 18 > JDK 8 > > > Samiul alom sium > Bangladesh >
JavaFx Problem
Why Apache NetBeans 12 don't execute my JavaFX program? I run the same to same program in IntelliJ IDEA community edition and it works. But NetBeans shows there are some errors. Here is my software usage: Apache NetBeans 12 Ubuntu 18 JDK 8 Samiul alom sium Bangladesh