當前位置: 首頁>>代碼示例>>Python>>正文


Python swing.JLabel方法代碼示例

本文整理匯總了Python中javax.swing.JLabel方法的典型用法代碼示例。如果您正苦於以下問題:Python swing.JLabel方法的具體用法?Python swing.JLabel怎麽用?Python swing.JLabel使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在javax.swing的用法示例。


在下文中一共展示了swing.JLabel方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: __init__

# 需要導入模塊: from javax import swing [as 別名]
# 或者: from javax.swing import JLabel [as 別名]
def __init__(self, extender):
        # Initialize self
        super(TitlePanel, self).__init__()
        self.extender = extender
        self.setLayout(GridLayout(2, 1))
        # Create children
        self.title = JLabel('Tracer')
        self.subtitle = JPanel()
        self.label = JLabel('Allows you to trace where inputs are reflected back to the user. Click "Start" to analyze the current site map.')
        # Configure children
        self.title.setFont(Fonts.Heading)
        self.title.setForeground(Colors.Orange)
        self.subtitle.layout.hgap = 0
        # Add children
        self.add(self.title)
        self.add(self.subtitle)
        self.subtitle.add(self.label) 
開發者ID:penafieljlm,項目名稱:burp-tracer,代碼行數:19,代碼來源:tracer.py

示例2: __init__

# 需要導入模塊: from javax import swing [as 別名]
# 或者: from javax.swing import JLabel [as 別名]
def __init__(self, callbacks, log):
        self.callbacks = callbacks
        self.log = log
        self.log_table = None # to be set by caller

        self.setLayout(BoxLayout(self, BoxLayout.PAGE_AXIS))

        label = JLabel("Reload from Git Repo:")
        button = JButton("Reload")
        button.addActionListener(CommandPanel.ReloadAction(log))
        self.add(label)
        self.add(button)

        label = JLabel("Send selected entries to respective Burp tools:")
        button = JButton("Send")
        button.addActionListener(CommandPanel.SendAction(self))
        self.add(label)
        self.add(button)

        label = JLabel("Remove selected entries from Git Repo:")
        button = JButton("Remove")
        button.addActionListener(CommandPanel.RemoveAction(self, log))
        self.add(label)
        self.add(button)

        # TODO: maybe add a git command box 
開發者ID:jfoote,項目名稱:burp-git-bridge,代碼行數:28,代碼來源:burp_git_bridge.py

示例3: initUI

# 需要導入模塊: from javax import swing [as 別名]
# 或者: from javax.swing import JLabel [as 別名]
def initUI(self):
        self.tab = swing.JPanel()

        # UI for Output
        self.outputLabel = swing.JLabel("LinkFinder Log:")
        self.outputLabel.setFont(Font("Tahoma", Font.BOLD, 14))
        self.outputLabel.setForeground(Color(255,102,52))
        self.logPane = swing.JScrollPane()
        self.outputTxtArea = swing.JTextArea()
        self.outputTxtArea.setFont(Font("Consolas", Font.PLAIN, 12))
        self.outputTxtArea.setLineWrap(True)
        self.logPane.setViewportView(self.outputTxtArea)
        self.clearBtn = swing.JButton("Clear Log", actionPerformed=self.clearLog)
        self.exportBtn = swing.JButton("Export Log", actionPerformed=self.exportLog)
        self.parentFrm = swing.JFileChooser()



        # Layout
        layout = swing.GroupLayout(self.tab)
        layout.setAutoCreateGaps(True)
        layout.setAutoCreateContainerGaps(True)
        self.tab.setLayout(layout)
      
        layout.setHorizontalGroup(
            layout.createParallelGroup()
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup()
                    .addComponent(self.outputLabel)
                    .addComponent(self.logPane)
                    .addComponent(self.clearBtn)
                    .addComponent(self.exportBtn)
                )
            )
        )
        
        layout.setVerticalGroup(
            layout.createParallelGroup()
            .addGroup(layout.createParallelGroup()
                .addGroup(layout.createSequentialGroup()
                    .addComponent(self.outputLabel)
                    .addComponent(self.logPane)
                    .addComponent(self.clearBtn)
                    .addComponent(self.exportBtn)
                )
            )
        ) 
開發者ID:InitRoot,項目名稱:BurpJSLinkFinder,代碼行數:49,代碼來源:FransLinkfinder.py


注:本文中的javax.swing.JLabel方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。