Comments (5)
It's forbidden to add a component twice. So if you add an Image in the first component then in the second component, it's removed in the first component then re-attached.
from vaadin-core.
Can you add that to the javadoc?
from vaadin-core.
That you can't add the same instance of a Component two times in a Vaadin application? It's not related to the the helper. I don't know if it's already documented?
(Note: I'm a tester, I've got the same bug as your first one and read this one :) )
from vaadin-core.
(Note: I'm a tester, I've got the same bug as your first one and read this one :) )
My bad. :)
Also, it does work in Swing so It is not immediately obvious why it shouldn't here.
JPanel panel = new JPanel();
panel.add(new JLabel("Hello"));
java.awt.Image img = ImageIO.read( new URL("https://yourhost.here/ball.png"));
panel.add("Foo", new JLabel(new ImageIcon(img)));
panel.add("Bar", new JLabel(new ImageIcon(img)));
JButton ok = new JButton("OK");
from vaadin-core.
As mentioned by @jcgueriaud1 , the same component can't be added twice. This isn't specific to the component but Vaadin in general. Closing as wontfix
from vaadin-core.
Related Issues (20)
- Vaadin Flow Text Field is not null safe HOT 2
- Pin transitive dependency versions also
- Time picker is missing from bower.json HOT 1
- Suggestion: Add way to modify renderer for selected item for ComboBox HOT 7
- Content renderer functions
- Material Design theme
- File Upload HOT 1
- Menu/menubar component HOT 2
- Compact theme HOT 1
- Accordion component
- Make a scrollable layout with Java API. HOT 3
- Add support for native <template> as an alternative to renderer HOT 6
- Change to use external icons instead of data: base64 encoded embedded icons HOT 2
- vaadin-core.js should import drawer toggle (?) HOT 3
- An easy way to add validators HOT 3
- Code examples for using TypeScript definitions [1d] HOT 2
- Add attribute JSDoc annotations for better vscode-lit-plugin support
- Chrome freezes in views with several nested layouts HOT 3
- Could not resolve "@vaadin/app-layout/drawer-toggle.js" HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vaadin-core.