How to get the user to change the background color of a JtextAreaHow to get an enum value from a string value in Java?How do I get the color from a hexadecimal color code using .NET?Changing org.eclipse.swt.widgets background color in WindowsHow do I change the full background color of the console window in C#?Java Change Button Background ColorBackground color, notepad++ for highlighting purposesChanging color of selected text in jTextPaneBoton61.setBackground(Color.red);; changing button background colorsHow do I change the color of an actual JButton in Java? Not the background and not the textJTextArea change next append's background color

How do I anonymously report the Establishment Clause being broken?

When is it legal to castle moving the rook first?

How do I make my fill-in-the-blank exercise more obvious?

Would you recommend a keyboard for beginners with or without lights in keys for learning?

ASCII Maze Rendering 3000

Is it possible to observe space debris with Binoculars?

Never make public members virtual/abstract - really?

A Meal fit for a King

Global variables and information security

How were the names on the memorial stones in Avengers: Endgame chosen, out-of-universe?

Do I have to rename all creatures in a new world?

Resizing attribute form in QGIS 3

Is a paralyzed creature limp or rigid?

Left my gmail logged in when I was fired

Shoes for commuting

Are treasury bonds more liquid than USD?

Life post thesis submission is terrifying - Help!

Are buttons really enough to bound validities by S4.2?

What is the statistical difference between "choose either total" or "choose new total" when rerolling damage die?

Bidirectional Dictionary

What drugs were used in England during the High Middle Ages?

Was "The Hobbit" ever abridged?

Is using different public keys for different peers safer than reusing the public key, beyond forward secrecy - x25519

Tiny image scraper for xkcd.com



How to get the user to change the background color of a JtextArea


How to get an enum value from a string value in Java?How do I get the color from a hexadecimal color code using .NET?Changing org.eclipse.swt.widgets background color in WindowsHow do I change the full background color of the console window in C#?Java Change Button Background ColorBackground color, notepad++ for highlighting purposesChanging color of selected text in jTextPaneBoton61.setBackground(Color.red);; changing button background colorsHow do I change the color of an actual JButton in Java? Not the background and not the textJTextArea change next append's background color






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I am coding a basic text editor and i want to give the user the option to change the background color. Right it can only be changed to red, here's my code snippet.



private void MiColorActionPerformed(java.awt.event.ActionEvent evt) 
jTextArea2.setSize(350, 350);
jTextArea2.setVisible(true);
jTextArea2.setBackground(Color.red);










share|improve this question






























    0















    I am coding a basic text editor and i want to give the user the option to change the background color. Right it can only be changed to red, here's my code snippet.



    private void MiColorActionPerformed(java.awt.event.ActionEvent evt) 
    jTextArea2.setSize(350, 350);
    jTextArea2.setVisible(true);
    jTextArea2.setBackground(Color.red);










    share|improve this question


























      0












      0








      0








      I am coding a basic text editor and i want to give the user the option to change the background color. Right it can only be changed to red, here's my code snippet.



      private void MiColorActionPerformed(java.awt.event.ActionEvent evt) 
      jTextArea2.setSize(350, 350);
      jTextArea2.setVisible(true);
      jTextArea2.setBackground(Color.red);










      share|improve this question














      I am coding a basic text editor and i want to give the user the option to change the background color. Right it can only be changed to red, here's my code snippet.



      private void MiColorActionPerformed(java.awt.event.ActionEvent evt) 
      jTextArea2.setSize(350, 350);
      jTextArea2.setVisible(true);
      jTextArea2.setBackground(Color.red);







      java colors background jtextarea






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 28 at 3:45









      CharliemkaCharliemka

      1




      1

























          1 Answer
          1






          active

          oldest

          votes


















          0
















          I would suggest you to use a JFrame or a JPanel, which is what I use when working JTextFields. You can then later on add the text field on the frame, with frame.add(textField).






          share|improve this answer
























            Your Answer






            StackExchange.ifUsing("editor", function ()
            StackExchange.using("externalEditor", function ()
            StackExchange.using("snippets", function ()
            StackExchange.snippets.init();
            );
            );
            , "code-snippets");

            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "1"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55389863%2fhow-to-get-the-user-to-change-the-background-color-of-a-jtextarea%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0
















            I would suggest you to use a JFrame or a JPanel, which is what I use when working JTextFields. You can then later on add the text field on the frame, with frame.add(textField).






            share|improve this answer





























              0
















              I would suggest you to use a JFrame or a JPanel, which is what I use when working JTextFields. You can then later on add the text field on the frame, with frame.add(textField).






              share|improve this answer



























                0














                0










                0









                I would suggest you to use a JFrame or a JPanel, which is what I use when working JTextFields. You can then later on add the text field on the frame, with frame.add(textField).






                share|improve this answer













                I would suggest you to use a JFrame or a JPanel, which is what I use when working JTextFields. You can then later on add the text field on the frame, with frame.add(textField).







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Mar 28 at 6:20









                AbhinavAbhinav

                1297 bronze badges




                1297 bronze badges





















                    Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.







                    Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.



















                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55389863%2fhow-to-get-the-user-to-change-the-background-color-of-a-jtextarea%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

                    Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

                    Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript