-2

I added one jtabbedpane to jframe and the added 3 pannel to jtabbedpane to make 3 tabs. Now i want to add long form in second tab but on running the program whole form is not visible so i am trying to enclose the second panel into JScrollpane but option is not visible it is gray out.

Please help me to solve this problem.

  • You need to post your code. Without seeing this it is hard to tell what is wrong with your code. – Thomas Fritsch Dec 18 '18 at 13:45
  • @ThomasFritsch did you understand my question ? Try to imagine the scenario then you will understand that there is no need of code. You can do it into your PC. – Sanjay Gupta Dec 18 '18 at 14:18
  • see : [do my work for me sort of programming questions: the worst possible sin on Stack Overflow](https://stackoverflow.blog/2009/07/23/non-english-question-policy/) – c0der Dec 18 '18 at 16:48
  • (1-) `did you understand my question?` - yes! You have a programming problem. We are not here to write the code for you. We are here to make a suggestion to your existing code to help solve the problem. If you can't post a proper [mcve] then we can't help. By the way the fact you are using multiple tabs is irrelevant to your question. Your real question is about how to display a big panel in a scroll pane. So first solve this problem, then apply the knowledge to your real application.. – camickr Dec 18 '18 at 16:59
  • @camickr my source code have 859 lines.. I can't able to post here...i use jform to develop my project. – Sanjay Gupta Dec 18 '18 at 17:15
  • That is the point of the "MCVE", to simplify the problem. Your real question is about displaying a panel in a scrollpane. You don't need 800 lines of code to do this. You create a panel. with a BoxLayout. Then you create a loop to add 100 labels to the panel. Then you create a JScrollPane using the panel as the component added to the viewport. Then you add the scroll pane to the frame. now you have a simple application that demonstrates how scrolling works. If you have problems you post this simplified code. – camickr Dec 18 '18 at 17:30
  • Then you can create a tabbed pane. Instead of adding the scroll pane to the frame you add it to the tabbed pane and the tabbed pane to the frame. Now you have a simple demo that uses a ttabed pane with a scrolling panel. It should be about 20 of code. Once you learn the basic concept you figure out what the problem is with your real code. We are certainly not going to look at 800 lines of code. You should be doing simple debugging BEFORE you write that much code. – camickr Dec 18 '18 at 17:31

1 Answers1

0

I found the solution

I added one more panel to my second tabb then i raised my all components to that and then i select all the components and enclosed into the JScrollpane

Done thanks...to all for giving your precious time