Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9004241
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:51:34+00:00 2026-06-16T00:51:34+00:00

private JEditorPane textArea[]= new JEditorPane[maxTabs]; I’ve got this table,I want to delete some elements

  • 0
private JEditorPane textArea[]= new JEditorPane[maxTabs];

I’ve got this table,I want to delete some elements and move the others, for example if I delete the second element, the third will be instead of the second and so on.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T00:51:36+00:00Added an answer on June 16, 2026 at 12:51 am

    Depending on scenario you are interested (we remove for example element at position 1)

    1) If elements should be shifted to left and last element should be set to 0 or null depending on type of array like

    before [0,1,2,3,4]
    after [0,2,3,4,0]

    you can use

    System.arraycopy(textArea, index+1, textArea, index, textArea.length-index-1);
    array[array.length-1]=null;
    

    2) when you want to replace old array with new one that wont contain selected element like

    before [0,1,2,3,4]
    after [0,2,3,4] //we removed element at position 1 (new array is smaller)

    you can try something like this

    List<JEditorPane> listCopy = new ArrayList<JEditorPane>(
            Arrays.asList(textArea));
    listCopy.remove(index);
    textArea = listCopy.toArray(new JEditorPane[listCopy.size()]);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

private void setFPAlarm() { Intent intent = new Intent(this, FPService.class); PendingIntent pi = PendingIntent.getService(this,
private void BuildGridView2() { GridView1.DataSource = new Select() .From(NewsReleases) .Where(RelMonth).IsEqualTo(this.ddlAward.SelectedValue) .And(RelYear).IsEqualTo(this.ddlYear.SelectedValue) .OrderAsc(RelDate) .ExecuteDataSet(); }
private SmtpClient getServer() { return (from e in doc.Elements(emailsetting) select new SmtpClient() { Host
private void sessionText() { try { System.IO.TextReader r = new System.IO.StreamReader(saved.txt); this.textBox1.Text = r.ReadLine();
private final List<KeyListener> keyListeners= new CopyOnWriteArrayList<KeyListener>(); public void addKeyListener(KeyListener keyListener){ keyListeners.add(keyListener); } In the
private String setDate(int day) { Calendar cal = Calendar.getInstance(); cal.setTime(new Date()); cal.add(Calendar.DATE, + day);
private TextBox txtBoxDragPoint = new TextBox(); private void rtbLogicCode_MouseDown(object sender, MouseEventArgs e) { if
private void SaveAsPicture_Click(object sender, RoutedEventArgs e) { WriteableBitmap bmp = new WriteableBitmap(MyUIElement, null); var
private static int SENSOR_DELAY_SLOW = 5000000; sensMngr = (SensorManager) getSystemService(SENSOR_SERVICE); sensMngr.registerListener(this, sensMngr.getDefaultSensor(Sensor.TYPE_ACCELEROMETER), SENSOR_DELAY_SLOW); I
private static int posNum() { Scanner scan = new Scanner(System.in); int input = 0;

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.