Win a copy of Java Database Connections & Transactions (e-book only) this week in the JDBC forum!

Tom Andreas Vingaas

Greenhorn
+ Follow
since Jun 23, 2018
Tom Andreas likes ...
IntelliJ IDE Java
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Tom Andreas Vingaas

hi i'm working on a controller class that have some textfields and they performs a bit strange, when i'm getting a long text from the database to populate the textfield that has alignment to center. te window size has small and  the text START at the middle of the textfield, but when i make the window lager and resize it back to the small size the text is starting where it should be.
anyone had som simular problems? is it a bug in javafx? I can't take a screen shot of my code or paste it in here. i'm only intereted to hear if someone has encontered a simular problem
1 month ago
hi, i'm trying to use openjdk11 and openjfx in my project. it works fine until i try using .fxml files.
thank you for upcomming answers!

i get this stacktrace:




this is my Main class:



here is my build.gradle file:





3 months ago
hi , I'm working on a side project where I'm making a fly tying desktop application. after some coding i came to a problem, i have fly pattern overview controller class that have a tableview with all recipes that exist in the database when i creates a new recipe in another controller class named addRecipeController, save it to the database and go back to the overview the tablew view is till the same. how can i update my tableview in overviewController when i'm have created the new recipe in the other controller
3 months ago
thanks! created a new constructor that has the id as parameter. i had thought about doing it that way, bu was not sure if that was the best soulution. thanks for quick answers!
3 months ago
Hi Dawn & David Griffiths, welcome to Ranch! I love the head first series.
4 months ago
hi need some help, I'm trying to extract all users from from my database and I have the resultset with all users, however my struggelig is when I'm trying to make them to User objects.
this is my current soulution and it works fine for all fields excepts for when it comes to the id, how can i assign the id fild from the resultset to my object without have a setter method ?

4 months ago
hi,  I managed to fix my filtering problem and make my code more cleaner and readable. I has just thinking to complicated ;)
6 months ago
When i try using all presicates no object showes up in the tableview. So i Wonder og you guys sees what’s wrong or if you guys have another way to code this
6 months ago
hi trying to filter out objects from a filteredlist based on what the user have passed in some textfields. struggelig a bit. i have no problem when i add one predicat, but when I'm trying to implement logic for for combining two or more predicates for the filteredlist it failed.
here's my code:




thanks for upcoming answers!
6 months ago
Hi, i have a little application where i have a tableview where i list objects that represent postal areas. i have some filters on the observable list that populate the tableview , i'm a little stuck when it comes to combine them to get a filtered result i have three textfield where you can filter som options, the first one you can filter ti a spesiffic name og number, the scond one you can set you only one postalareas where postal numbers are larger than the input value and the third one to only get postal areas that are smaller than the input value. i'm struggling to combine these filters

code
6 months ago
hi, i have a list of objects that represent postal areas, the postal class have two String properies postalnumber and postalname. i'm making a feature to seach for s spesiffic postal area and you can seach on both name and number. my problem now is i'm trying to add a som more for the postal feature to can specify a intervall of postal numbers that vil be shown. for example: i want to see all postal numbers from postalnumber 1256 to postal number 3678. any idea of i can accomplished this task? have tried to stream the list and add a filter, my problem is that the postalnumber is a string
6 months ago
Hi, wanted to code a good and secure login to my Java fx application, but does not know where ro start. Anyone ego kan hive me som leads, examples and so on?

Best regards Tom
6 months ago
can someone help me with adding teasm to the match? sometime the last match only get one team
here is my code:

for (Match match : matches){
           for (Team team : teams){
               if (match.getTeams().size() < 2){
                   boolean finnes = false;
                   for (Match unik : matches ){
                       if (unik.getTeams().contains(team)){
                           finnes = true;
                       }
               }
               if (!finnes){
                   match.getTeams().add(team);
               }
               Collections.shuffle(teams);
               }
           }
       }
7 months ago
thanks for the good advice! help me a lot
7 months ago
i agree with you, after some thoughts i see your point.

thanks for your opinions, fairly new to to design a application, so i'm learning a lot of you guys! if you guys have any suggestions i'm verry keen to hear them
7 months ago