Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I want to include sth like a logo or a header/banner into my window. I possibly want to avoid using png/jpg Images, because this could look weird when my application runs on high res displays. So i created my banner as an svg. How can i insert this into my window? I know that it isn't possible to include it with the ImageView class of javafx, but i heard about the possibility to compose an svgpath-group in fxml/css and then load it via fxmlloader. But how do i do this whith all things like color gradients, ...? How do i have to compose my java/fxml document to show a scalable banner?
There are various options do do this. I gave you a hint to the first one already in your previous question. (Use e(fx)clipse and convert the SVG to an FXML file.) This also handles all the color and gradient issues.
Another option is to use this little library https://github.com/codecentric/javafxsvg which makes it possible to treat any SVG image in the same way as a regular JavaFX image. It is rendered internally and can thus be adapted to any size or resolution change.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
What code shall I use to add shadow effects to a panel in Java swing, I know the same is available in javafx but can we do the same in swing?
Swing does not provide built-in capabilities for these.
You can drop shadow either by adding border or draw manually. Here are some examples for dropping shadow from JPanel
Animation is more complex, one approach is to use timer and change properties or draw on appropriate ticks, another is to incorporate some library like Timing Framework.
As a side note, you are asking two different questions in one and probably you need to do some research by yourself before posting and provide the results in the question.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I'm trying to add an image from my backend to a certain pin, currently I can add the title and the snippet but how do i add and image to that?
You need to create Custom Info window for that. For Official documentation, you can refer this https://developers.google.com/maps/documentation/android-api/infowindows
Also you can find a sample tutorial here http://android-er.blogspot.in/2013/01/create-custom-info-contents-for-by.html
Also one more thing, you may not be able to distinguish between click events on various components of the layout as mentioned in the documentation.
As mentioned in the previous section on info windows, an info window
is not a live View, rather the view is rendered as an image onto the
map. As a result, any listeners you set on the view are disregarded
and you cannot distinguish between click events on various parts of
the view. You are advised not to place interactive components — such
as buttons, checkboxes, or text inputs — within your custom info
window.
But you can follow this workaround for making them work.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I made a notepad application using java swing and currently it has the following features in it, you can create a new file and save it to the desired location also you can open an existing file, edit it and save it on a new location or update the existing one.Now i want to add the feature that would support the multiple file editing/creating at the same time, just like in notepad++. I have not much idea about how could this be done, please tell me the way to do it.would multi threading help?
Take a look at the jTabbedPane documentation:
http://docs.oracle.com/javase/tutorial/uiswing/components/tabbedpane.html
With the tabbed pane you can use several components and manage them all without threading (only one tab is active at a time) it will just require some additional logic to determine which tab/text area you are currently viewing when the toolbar features are used.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I'm trying to figure out how to just highlight certain parts of an image for android. I'll do more once I can highlight the certain part of the image, but I can't seem to figure this out.
For example, I have an image of the human body. I just want to be able to select a part of it, such as the brain, arm, stomach, heart, etc. I'm using a image found online from a png file, let me know if it's better to create an image using java.drawable or if I can just work with the downloaded image.
What is the best way to go about this in Java? The only way I can think of is replacing the image with another selected one, but I don't want to have to handle 20 different images.
You might be able to overlay a highlight color or a highlight image by using the methods described at overlay two images in android to set an imageview
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 4 years ago.
Improve this question
Are there any tools for UI screen design for mobile devices or
Is most of the design done in a generic Image/DTP editing/creating software like MS Windows Paint or the likes?
I found a few tools for creating sprite image filmstrips, like MotionWelder,
However I haven't found any tools for UI screen design and am generally working in a non-structured manner.
I have tested out NetBeans Visual Builder its nice for component based layout, however I don't think it supports a more open user based component and pixel based view of the screen.
I haven't tried NetBeans'Game Builder either maybe I should have a look there?
What would be a more efficient way of Screen design and then say export the resulting screens to your app?
From my experience, a Canvas based layout, with the UI designed as screenshots by designers using Photoshop and then they providing image assets has worked well. I personally like the flexibility and control this provides.
LWUIT is a nice user interface toolkit for J2ME. It allows you to create interfaces in a similar manner to Swing, e.g. using BorderLayouts etc.
When I wrote an application for a mobile device I basically created a background image in paint an imported it into the application. I then used the Canvas class to draw on top of that image to add the additional bits and pieces I needed (such as buttons and text etc.)