---
Product: Aspose.Slides
Platform: java
Page Type: reference
Canonical URL: https://reference.aspose.org/slides/java/TextFrame
---

# TextFrame

## Overview

`TextFrame` is a class in Aspose.Slides FOSS for Java.
Inherits from: `ITextFrame`.

Represents a text frame containing paragraphs.

This class provides 12 methods for working with TextFrame objects in Java programs.
Available methods include: `TextFrame`, `asIPresentationComponent`, `asISlideComponent`, `getParagraphs`, `getParentCell`, `getParentShape`, `getPresentation`, `getSlide`, `getText`, `getTextFrameFormat`, `setText`.
All public members are accessible to any Java application after installing the Aspose.Slides FOSS for Java package.
Properties: `paragraphs`, `parentCell`, `parentShape`, `presentation`, `slide`, `text`, and 1 more.

## Properties

| Name | Type | Access | Description |
|------|------|--------|-------------|
| `paragraphs` | `IParagraphCollection` | Read | Returns the paragraph collection. |
| `textFrameFormat` | `ITextFrameFormat` | Read | Returns the text frame format. |
| `text` | `String` | Read | Gets the text. |
| `slide` | `IBaseSlide` | Read | Gets the slide. |
| `presentation` | `IPresentation` | Read | Gets the presentation. |
| `parentShape` | `IShape` | Read | Gets the parent shape. |
| `parentCell` | `ICell` | Read | Gets the parent cell. |

## Methods

| Signature | Description |
|-----------|-------------|
| `TextFrame(txBodyElement: Element, saveCallback: Runnable)` | Creates a TextFrame backed by the given text body element. |
| `TextFrame(txBodyElement: Element, saveCallback: Runnable, parentSlide: IBaseSlide, parentShape: IShape)` | Creates a TextFrame backed by the given text body element with parent context. |
| `getParagraphs()` → `IParagraphCollection` | Returns the paragraph collection. |
| `getTextFrameFormat()` → `ITextFrameFormat` | Returns the text frame format. |
| `getText()` → `String` | Returns the text. |
| `setText(text: String)` | Sets the text value. |
| `getSlide()` → `IBaseSlide` | Returns the slide. |
| `getPresentation()` → `IPresentation` | Returns the presentation. |
| `asIPresentationComponent()` → `IPresentationComponent` | Casts the text frame to an IPresentationComponent |
| `getParentShape()` → `IShape` | Returns the parent shape. |
| `getParentCell()` → `ICell` | Returns the parent cell. |
| `asISlideComponent()` → `ISlideComponent` | Casts the text frame to an ISlideComponent |

## See Also

- [Aspose.Slides — Enterprise API Reference](https://reference.aspose.com/slides/)