Click here to Skip to main content
14,243,297 members
   

Java

 
AnswerRe: Threads Priority Pin
Richard MacCutchan8-Oct-18 23:01
protectorRichard MacCutchan8-Oct-18 23:01 
GeneralRe: Threads Priority Pin
ashutoshgadgil9-Oct-18 6:45
memberashutoshgadgil9-Oct-18 6:45 
GeneralRe: Threads Priority Pin
Richard MacCutchan9-Oct-18 7:03
protectorRichard MacCutchan9-Oct-18 7:03 
QuestionProject execution Pin
Member 138896166-Oct-18 8:46
memberMember 138896166-Oct-18 8:46 
AnswerRe: Project execution Pin
OriginalGriff6-Oct-18 8:48
protectorOriginalGriff6-Oct-18 8:48 
QuestionDeclaring one variable as multiple things. How? Pin
Member 1397832611-Sep-18 21:02
memberMember 1397832611-Sep-18 21:02 
AnswerRe: Declaring one variable as multiple things. How? Pin
Richard MacCutchan11-Sep-18 21:24
protectorRichard MacCutchan11-Sep-18 21:24 
QuestionHow to add a toolbar to JInternalFrame ? Pin
Withanam5-Sep-18 0:42
memberWithanam5-Sep-18 0:42 
I am a beginner and trying to write a small Java MDI Application. I wrote a ToolBar class to use a common tool bar to child forms.

import java.awt.BorderLayout;
import javax.swing.*;

public class ToolBar extends JFrame {
    
    JToolBar tb;
    JButton exit;
    
    public ToolBar(){
    
        setSize(400,400);
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        
        tb = new JToolBar();
        exit = new JButton("Exit");
        tb.add(exit);
        add(tb,BorderLayout.WEST);
    }


I called the class in the child form like below

public FrmItemTypes() {
      initComponents();

     ToolBar t = new ToolBar();
     t.setVisible(true);
  }


and used the menu to open the child form.

FrmItemTypes ft = new FrmItemTypes();
   this.desktopPane.add(ft);
   ft.setVisible(true);


Before use the tool bar, it is loading well. But when I say

ToolBar t = new ToolBar();
      t.setVisible(true);


the child form comes out from the main form and it shows like a normal form.(Not like a MDI child)

Please help...
AnswerRe: How to add a toolbar to JInternalFrame ? Pin
Richard MacCutchan5-Sep-18 0:50
protectorRichard MacCutchan5-Sep-18 0:50 
QuestionJavaFX DatePicker update value to null [SOLVED] Pin
Valentinor3-Sep-18 1:11
memberValentinor3-Sep-18 1:11 
AnswerRe: JavaFX DatePicker update value to null Pin
Valentinor29-Sep-18 6:53
memberValentinor29-Sep-18 6:53 
QuestionJava cv Pin
Member 1391875527-Aug-18 17:53
memberMember 1391875527-Aug-18 17:53 
AnswerRe: Java cv Pin
Richard MacCutchan27-Aug-18 22:01
protectorRichard MacCutchan27-Aug-18 22:01 
AnswerRe: Java cv Pin
GiteHrudaya25-Nov-18 22:15
memberGiteHrudaya25-Nov-18 22:15 
QuestionJavaFX program exit without Java JDK installed [SOLVED] Pin
Valentinor25-Aug-18 9:22
memberValentinor25-Aug-18 9:22 
QuestionRe: JavaFX program exit without Java JDK installed Pin
Richard MacCutchan25-Aug-18 1:33
protectorRichard MacCutchan25-Aug-18 1:33 
AnswerRe: JavaFX program exit without Java JDK installed Pin
Valentinor25-Aug-18 3:06
memberValentinor25-Aug-18 3:06 
GeneralRe: JavaFX program exit without Java JDK installed Pin
Richard MacCutchan25-Aug-18 3:17
protectorRichard MacCutchan25-Aug-18 3:17 
AnswerRe: JavaFX program exit without Java JDK installed Pin
Valentinor25-Aug-18 3:18
memberValentinor25-Aug-18 3:18 
GeneralRe: JavaFX program exit without Java JDK installed Pin
Richard MacCutchan25-Aug-18 3:28
protectorRichard MacCutchan25-Aug-18 3:28 
GeneralRe: JavaFX program exit without Java JDK installed Pin
Valentinor25-Aug-18 3:42
memberValentinor25-Aug-18 3:42 
GeneralRe: JavaFX program exit without Java JDK installed Pin
Valentinor25-Aug-18 4:19
memberValentinor25-Aug-18 4:19 
GeneralRe: JavaFX program exit without Java JDK installed Pin
Richard MacCutchan25-Aug-18 5:47
protectorRichard MacCutchan25-Aug-18 5:47 
GeneralRe: JavaFX program exit without Java JDK installed Pin
Richard MacCutchan25-Aug-18 4:35
protectorRichard MacCutchan25-Aug-18 4:35 
GeneralRe: JavaFX program exit without Java JDK installed Pin
Valentinor25-Aug-18 4:55
memberValentinor25-Aug-18 4:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.