Boundary for comment box
In my java application, I need to create a comment box for the users to add comments. Moreover, I need to provide the user with the provision for resizing and dragging the comment box. For this, I need to show a boundary around the comment box as in the case of comment box in Microsoft Excel which I have shown below:
I dont need the circles shown on the boundary for resizing because I will be using a triangle kind of a thing on the bottom-right of the box. But I need the dotted area.
How do I create it for my application in java? Any good thoughts?
Currently I am in an analysis phase, just to find good options for this. What we have thought till now is to draw few dotted lines around the box to give the impression.
Asked by: Samantha883 | Posted: 23-01-2022
Answer 1
I would perhaps look at using JXLayer for this. It looks like what you're trying to do here is paint some context outside the of component's bounds. This is the kind of thing JXLayer excels at.
Answered by: Emma789 | Posted: 24-02-2022Answer 2
This can be a little bit tricky. When you need semitransparent border it will be pain. If not, it is easy. Just use popup with appropriate components and mouse listener to listen on mouse events occurred over active borders.
Answered by: Kellan345 | Posted: 24-02-2022Similar questions
regex - Use of \G boundary matcher in Java
I've been learning regex with java.
I wanted to know if it makes sense to use \G while using java's matcher.
I couldn't find any example of \G used with java :(
Doing something like this would not have the same output as using \G?
String a = "Pruebaprueba";
Matcher matcher = Pattern.compile("(\\w)").matcher(a);
while ( matcher.find() ) {
// Do something with each letter
}
Thank...
java - How to display image within cell boundary
How can I place an image within the cell boundary?
I mean without taking the space of other cell?
In the code below, random cells were selected to display images. One image in one cell.
The problem is that, the image seems to take other cells as well.
alt text http://www.freeimagehosting.net/image.php?9f84119a63.jpg
java - How to set bit values which are not divided on byte boundary
I have a header field of 2 bytes where first four bits are packet type and other 12 bits are for length. but i don't know how to store this values and retrieve them.
I am using ms c++ for client and java for server. It is the client which has to set this values and server has to retrieve it.
Thanks
java - Getting boundary information from a 3d array
Hey, I'm currently trying to extract information from a 3d array, where each entry represents a coordinate in order to draw something out of it. The problem is that the array is ridiculously large (and there are several of them) meaning I can't actually draw all of it.
What I'm trying to accomplish then, is just to draw a representation of the outside coordinates, a shell of the array if you'd like. This array is n...
java - Entity Control Boundary and CEC Patterns
i have reading this article http://www.oracle.com/technetwork/issue-archive/2011/11-jan/o11java-195110.html
which mentioned about Entity Control Boundary and CEC patterns.
AFAIK, the boundary is a facade pattern where CDI is better than ejb in some situation but ejb is enough for other situation.
Boundary Case Testing in Java
Are there any tools for JUnit or Java practises that allow for boundary case tests like "less than" and "greater than" to be accurately tested?
For example, rounding monetary values half-up to nearest cent.
Testing 0.005 rounds up to 0.01 is easy.
Testing <0.005 rounds down is not (strictly speaking).
I can obviously test an arbitrary value like 0.0049, but this doesn't guarantee that another value like ...
java - Making an Image a "boundary"
I am working on a game in which you are a simple circle that fires bullets and its multiplayer and so on. Well, I am trying to make boundaries sort of like a maze type thing that u have to go through I have tried collision detection like this:
public void checkCollisions(){
Rectangle r1 = bo.getBounds();
Rectangle d = p.getBounds();
if (d.intersects(r1))
border = true;
}
java - EJB vs CDI and the "Entity Boundary Control" pattern
Im trying to get my head around CDI and EJB and the Entity Boundary Control (ECB) pattern. My understanding of the ECB pattern is that the Boundary is the start and end of the transaction boundary. Further to that, CDI doesn't provide transaction support like an EJB does.
So if I want to implement the ECB pattern successfully, then the following are true;
I can Implement the Boundary portion with ...
java - ECB pattern - what is really a boundary?
I've just watched Uncle Bob's presentation on Architecture software :
http://www.cleancoders.com/codecast/clean-code-episode-7/show
He talks about ECB pattern (Entities - Controllers - Boundaries)
He insists on the fact that all softwares must be primary though as a whole of Use Cases.
Indeed, he repea...
java - How to detect a click on JTable row boundary?
I have a JTable in my application. I have a custom renderer setup on the table (a JTextArea, with line-wrapping enabled) which allows for multi-line content. The contents of the JTable cells are expected to overflow the bounds of the cell in some cases. I want to do the following:
Instead of making the user drag the row border to resize the cell, I want the user to be able to double-click the row border, so when I ...
Still can't find your answer? Check out these amazing Java communities for help...
Java Reddit Community | Java Help Reddit Community | Dev.to Java Community | Java Discord | Java Programmers (Facebook) | Java developers (Facebook)