Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Java
  4. JTextArea problem

JTextArea problem

Scheduled Pinned Locked Moved Java
graphicshelp
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    bijalvadher
    wrote on last edited by
    #1

    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.

    N 1 Reply Last reply
    0
    • B bijalvadher

      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.

      N Offline
      N Offline
      Nagy Vilmos
      wrote on last edited by
      #2

      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

      B 1 Reply Last reply
      0
      • N Nagy Vilmos

        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

        B Offline
        B Offline
        bijalvadher
        wrote on last edited by
        #3

        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);

        A 1 Reply Last reply
        0
        • B bijalvadher

          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);

          A Offline
          A Offline
          Alok Sharma ji
          wrote on last edited by
          #4

          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.....

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups