All Questions
Tagged with components java
614 questions
1
vote
1
answer
68
views
Java modularization for interface that its static method depends on implementations
I want to separate the api from the implementation, and making implementation module depends on api modules, however I encounter the problem that api actually depends on the implementation and don't ...
2
votes
1
answer
107
views
Why is ApplicationProperties null during @PostConstruct in my Vaadin Spring Boot application?
I am working on a Vaadin application using Spring Boot, and I am running into an issue where ApplicationProperties is null during the @PostConstruct method in my MenuLayout class. This causes the menu ...
-1
votes
1
answer
49
views
paintComponent invoked many times
I'm creating a shooting game. When the bullet (which is a JLabel) passes through the enemy (which is a JPanel) then the paintComponent() method gets invoked until the bullet has passed through the ...
0
votes
1
answer
119
views
How to get Java Swing Components to display on a JPanel within a JFrame, so you can add and remove them afterwards?
I have this custom component:
import java.awt.*;
import javax.swing.*;
public class Comp extends JComponent{
int x;
int y;
String name;
public Comp(int px, ...
0
votes
1
answer
25
views
Get the variable associated with a JPanel component from a component array
Say I have a JPanel with buttons (and other things) as components and I make an array of those components as such:
JPanel panel = new JPanel();
JButton btn1 = new JButton();
JButton btn2 = new ...
1
vote
1
answer
411
views
Cordova Android Gradle Build components uncompatible
I am trying to set up a new project with Cordova for the first time. I would like to test the project on my connected Android Phone, but I am having trouble with the required components and don't know ...
0
votes
1
answer
161
views
Error: JavaFX runtime components are missing, and are required to run this application in generated jar using eclipse
I am getting the above error while running the JavaFX jar file on the command prompt or by double-clicking.
I want the jar file to be run like an application by double-clicking on it.
I have tried ...
2
votes
0
answers
45
views
Spring: need to instanciate singletion twice, in different context
My Springboot application has a module providing a technical feature
Inside this module (let's call it MyModule), all @Component classes are singleton: they need to be instantiated only once
package ...
0
votes
0
answers
34
views
Custom popup don't always get focus
I try to basically implement my own combobox for Swing, because JComboBox has some behavior that doesn't suit my requirements and what I need to override is private, so...
Anyway, I tried making a ...
0
votes
1
answer
174
views
What POJO, DTO, Entity and other such components called?
I am searching for a keyword which defines POJO, Entities, Controllers and other components all together?
As I wanted to know about all of them, I was searching for a site, so I tried searching Java ...
0
votes
2
answers
209
views
Is a @Component contains other @Components which also contain @Components a bad idea in SpringBoot?
Think of this scenario. I have a component that @Autowired another component that also @Autowired another component.
Animal.java
@Component
public class Animal{
@Autowired
private Dog dog;
...
}
...
0
votes
0
answers
36
views
getWidth() is not working inside looping over HashMap
friends.
I'm trying to write the JAVA program that will draw graph based on the input that user will provide. I have class that represents the canvas on which the graph of names is drawn. This class ...
0
votes
1
answer
49
views
Dynamically adding components to JFrame
I'm looking for a way to dynamically add a Component inside a JFrame after it has been set visible.
Specifically, I'm making a request to a database and based on the length of the result, I want to ...
0
votes
0
answers
66
views
Vaadin 14 Notification is stealing component from parent
i have very weird bug that is very easy to reproduce. I'm creating notification without duration with some components in it. It is opened in route layout with @PreserveOnRefresh. and after loading ...
1
vote
3
answers
6k
views
@Component with request scope attributes
I have a class in my SpringBoot project with @Component. By default, the Scope of this is singleton and it's OK.
But now I need an object, with request scope, that will be used in many methods of this ...