1 / 7

Pane, Internal /External Frame, Image Processing

Pane, Internal /External Frame, Image Processing. By: Greg. JTabbedPane. A component that lets the user switch between a group of components by clicking on a tab with a given title and/or icon. Examples : PaintPanel Project, Tab Panel Project. JSplitPane. JSplitPane

Download Presentation

Pane, Internal /External Frame, Image Processing

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Pane, Internal /External Frame, Image Processing By: Greg Java 9 - GUI

  2. JTabbedPane • A component that lets the user switch between a group of components by clicking on a tab with a given title and/or icon. • Examples : PaintPanel Project, Tab Panel Project Java 9 - GUI

  3. JSplitPane • JSplitPane • Used to divide two (and only two) Components. • The two Components are graphically divided. • The two Components can then be interactively resized by the user. • Example: PaintPanel Project Java 9 - GUI

  4. JDesktopPane and JInternalFrame • Multiple document interface • Main (parent) window • Child windows • Switch freely among documents • Example: Menu Project Java 9 - GUI

  5. Windows (External Frame) • JFrame • Windows with title bar and border • Subclass of java.awt.Frame • Subclass of java.awt.Window • Heavyweight component • Three operations when user closes window • DISPOSE • DO_NOTHING • HIDE • EXIT_ON_CLOSE (Default) • Example: Menu Project Java 9 - GUI

  6. Simple Image Processing • ImageIO class provides a set of methods that perform most simple Image I/O operations. • Reading an image in a supported format (GIF, BMP, PNG, or JPEG) is simple: File f = new File("c:\images\myimage.gif"); BufferedImage bi = ImageIO.read(f); • Image format will be auto-detected by the API based on the contents of the file. Java 9 - GUI

  7. Simple Image Processing • Writing an image in a supported format is equally simple: BufferedImage bi; …. processed … File f = new File("c:\images\myimage.png"); ImageIO.write(bi, "png", f); • The list of supported formats may be obtained by calling ImageIO.getReaderFormatNames() or ImageIO.getWriterFormatNames(). • This will return an array of Strings containing the names of the available formats. Java 9 - GUI

More Related