JTextArea problem
-
Hello, I have a JTextArea in a panel,I am reducing its bounds and then printng it to graphics object. But there is a problem with it the text on the right border gets cut...i am unable to understand why is it so.
-
Hello, I have a JTextArea in a panel,I am reducing its bounds and then printng it to graphics object. But there is a problem with it the text on the right border gets cut...i am unable to understand why is it so.
Example code helps. There could be any one of a thousand reasons it doesn't work, without code it is impossible to help.
Panic, Chaos, Destruction. My work here is done. Drink. Get drunk. Fall over - P O'H OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett
-
Example code helps. There could be any one of a thousand reasons it doesn't work, without code it is impossible to help.
Panic, Chaos, Destruction. My work here is done. Drink. Get drunk. Fall over - P O'H OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett
jComp.setBounds((int)Math.round(rectangle.getX()), (int)Math.round(rectangle.getY()), (int)rect.getWidth(), (int)rect.getHeight()); java.awt.Font font = fontSizeMap.get(jComp); -------//jcomp is a jtextfield jComp.print(graphics2D);
-
jComp.setBounds((int)Math.round(rectangle.getX()), (int)Math.round(rectangle.getY()), (int)rect.getWidth(), (int)rect.getHeight()); java.awt.Font font = fontSizeMap.get(jComp); -------//jcomp is a jtextfield jComp.print(graphics2D);
your problem is right in front of you, you are changing size of textAREA but i can't see font rules.
if you cant solve it, you might missed something.....